LoaderMax(greensock)强制GC问题
LoaderMax 在其位于 loader/core 下的 DisplayObjectLoader.as 类中使用以下函数:
尽管他们已将强制 GC 置于 Try/Catch 块下。 Flash Player 11 仍然会崩溃。对此有什么想法吗?
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) {
}
}
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) {
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您可以编辑强制GC并使用System.pauseForGCIfCollectionImminent(0.25)
Perhaps you could edit the forced gc out and use System.pauseForGCIfCollectionImminent(0.25)
要连接2个不同的连接,你可以尝试:
但我不知道这会强制GC。
To connect 2 different connections you can try:
But I don't know will this force the GC.