mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +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 */
|
||||
public override destroy (options?: boolean | IDestroyOptions | undefined): void {
|
||||
if (this.autoUpdate) this.autoUpdate = false;
|
||||
for (const [, mesh] of this.meshesCache) {
|
||||
mesh?.destroy();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user