Adobe Flash 中的垃圾收集

发布于 2024-12-12 22:20:56 字数 187 浏览 4 评论 0原文

我有一个关于闪存中垃圾收集的问题。 我正在使用 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 技术交流群。

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

发布评论

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

评论(1

无语# 2024-12-19 22:20:56

垃圾收集仅收集垃圾,即不再引用的对象。因此,假设 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.

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