如何禁用垃圾收集AS3 [英] how to disable garbage collector as3

查看:85
本文介绍了如何禁用垃圾收集AS3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我正在与AS3真是浩大工程,并I`d想知道如何禁用垃圾收集器,因为用户可能会在长时间,我不希望他或她只是被切断,因为垃圾收集器删除一些应该现在需要监听的地方。

so, I am making really enormous project with as3, and I`d like to know how to disable garbage collector, as user might be on for long and I dont want him or her to just be cut off because garbage collector removed some listener somewhere that should be now needed.

有没有更简单的方法来禁用垃圾收集器不是去每一个听众和命名听者之后加上假,0,真正的扩展?

is there easier way to disable garbage collector than go to every single listener and add "false, 0, true" extension after naming the listener?

推荐答案

没有这是不可能的,但你害怕的究竟是不是一个真正的问题。

No it's not possible, but what you're afraid of isn't really an issue.

此外,使事件监听器弱不禁止垃圾收集器,实际上它使任何对象就被设置为符合垃圾收集,如果这是留给他们的唯一参考。

Also, making event listeners weak doesn't disable the garbage collector, in fact it makes whatever object they are set to eligible for garbage collection if that is the only reference left to them.

这篇关于如何禁用垃圾收集AS3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆