Adobe Flash 中的垃圾收集
我有一个关于闪存中垃圾收集的问题。 我正在使用 Flash AS3 制作游戏。该游戏将持续开放几个小时,例如 5 - 6 小时。人们会在这些时间里一遍又一遍地玩它。我的 Flash 游戏中有 15 个加载程序,并且不想出现垃圾收集问题。我在不需要时卸载每个加载对象,但我不确定我是否在垃圾收集方面遇到麻烦?
如果我这样做,我该如何解决? 谢谢。
I've a question about garbage collection in flash.
I'm making a game using with Flash AS3. This game will stay open for a few hours, like 5 - 6 hours. People will play it again and again in these hours. I have 15 loader in my flash game and don't want to have a problem with Garbage Collection. I'm uninstalling every load object when it is not necessary but i'm not sure do i have trouble about this garbage collection?
If i do, how can i solve it?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
垃圾收集仅收集垃圾,即不再引用的对象。因此,假设 Flash Player 能够保留分配的内存,您仍在引用的所有对象都将保留在那里。
不过,让您的应用程序需要更少的内存将是一个更好的主意。
The garbage collection only collects garbage, that are objects that are no longer referenced. As such all objects you are still referencing will stay there, presumed that the Flash Player is able to keep the memory allocated.
It would be a better idea to make your application requiring less memory though.