mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[haxe] Add dispose function to starling. Add clearListeners to dispose/destroy.
This commit is contained in:
parent
e9ffad91c5
commit
34ccf846a9
@ -116,9 +116,9 @@ class SkeletonSprite extends FlxObject
|
|||||||
|
|
||||||
override public function destroy():Void
|
override public function destroy():Void
|
||||||
{
|
{
|
||||||
skeleton = null;
|
state.clearListeners();
|
||||||
state = null;
|
state = null;
|
||||||
stateData = null;
|
skeleton = null;
|
||||||
|
|
||||||
_tempVertices = null;
|
_tempVertices = null;
|
||||||
_quadTriangles = null;
|
_quadTriangles = null;
|
||||||
|
|||||||
@ -416,4 +416,13 @@ class SkeletonSprite extends DisplayObject implements IAnimatable {
|
|||||||
bone.worldToLocal(point);
|
bone.worldToLocal(point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override public function dispose():Void {
|
||||||
|
if (_state != null) {
|
||||||
|
_state.clearListeners();
|
||||||
|
_state = null;
|
||||||
|
}
|
||||||
|
if (_skeleton != null) _skeleton = null;
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user