[haxe][starling] SkeletonSprite remove from stage and juggler when disposed.

This commit is contained in:
Davide Tantillo 2025-04-02 11:07:13 +02:00
parent 044bb47479
commit 4ea6ee9ff8

View File

@ -423,6 +423,10 @@ class SkeletonSprite extends DisplayObject implements IAnimatable {
_state = null; _state = null;
} }
if (_skeleton != null) _skeleton = null; if (_skeleton != null) _skeleton = null;
dispatchEventWith(starling.events.Event.REMOVE_FROM_JUGGLER);
removeFromParent();
// this will remove also all starling event listeners
super.dispose(); super.dispose();
} }
} }