LoaderMax uses the following function in their DisplayObjectLoader.as class which is under loader/core :
Although they have put the forced GC under a Try/Catch block. Flash Player 11 still manages to crash on it. Any ideas about this?
protected static function _forceGCHandler(event:Event):void {
if (_gcCycles == 0) {
_gcDispatcher.removeEventListener(Event.ENTER_FRAME, _forceGCHandler);
_gcDispatcher = null;
} else {
_gcCycles--;
}
try {
new LocalConnection().connect("FORCE_GC");
new LocalConnection().connect("FORCE_GC");
} catch (error:Error) {
}
}