mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ts][pixi] Fix memory leak due to not removing spine object from ticket. Close #2571.
This commit is contained in:
parent
a1f077d43c
commit
b4fd5d7bdd
@ -199,6 +199,7 @@ export class Spine extends Container {
|
|||||||
|
|
||||||
/** Destroy Spine game object elements, then call the {@link Container.destroy} with the given options */
|
/** Destroy Spine game object elements, then call the {@link Container.destroy} with the given options */
|
||||||
public override destroy (options?: boolean | IDestroyOptions | undefined): void {
|
public override destroy (options?: boolean | IDestroyOptions | undefined): void {
|
||||||
|
if (this.autoUpdate) this.autoUpdate = false;
|
||||||
for (const [, mesh] of this.meshesCache) {
|
for (const [, mesh] of this.meshesCache) {
|
||||||
mesh?.destroy();
|
mesh?.destroy();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user