Open ghost opened 8 years ago
That piece of code is only meant to apply to MovieClips anyway - it just aims to stop() the playhead, that's all. Flash had some memory leak problems when MovieClips weren't stopped (which has nothing to do with LoaderMax). Why do you say that it's a "possible memory leak" in LoaderMax?
I'm sorry, now I saw a method unloadAndStop. but prior to version 10, if we load the SWF where the base class inherits the Sprite, and a few frames, and then when you call unload animation not stops.
/** @private **/ protected function _stopMovieClips(obj:DisplayObject):void { var mc:MovieClip = obj as MovieClip; if (mc == null) { return; } mc.stop(); var i:int = mc.numChildren; while (--i > -1) { _stopMovieClips(mc.getChildAt(i)); } }
does not work when the main class inherits from Sprite, or contains Sprite