LoaderMax(greensock)强制GC问题

发布于 2024-12-17 09:54:01 字数 598 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

枕梦 2024-12-24 09:54:01

也许您可以编辑强制GC并使用System.pauseForGCIfCollectionImminent(0.25)

Perhaps you could edit the forced gc out and use System.pauseForGCIfCollectionImminent(0.25)

会发光的星星闪亮亮i 2024-12-24 09:54:01

要连接2个不同的连接,你可以尝试:

new LocalConnection().connect("FORCE_GC");
new LocalConnection().connect("FORCE_GC1");

但我不知道这会强制GC。

To connect 2 different connections you can try:

new LocalConnection().connect("FORCE_GC");
new LocalConnection().connect("FORCE_GC1");

But I don't know will this force the GC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文