破坏Flash对象完全 [英] Destroy Flash Objects Completely

查看:135
本文介绍了破坏Flash对象完全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我毁了我的对象是在舞台上。我通常只是removeChild之(本),并删除了对象的事件侦听器。这一切,我需要做彻底删除对象??

When I destroy my objects that are on the stage. I usually just removeChild(this) and I remove event listeners of the object. is this all I need to do to completely remove the object ??

推荐答案

是的......之类的。

Yes... sort of.

在AS3中,你不能破坏的对象。所有你能做的就是删除所有对它们的引用,这使得它们可进行垃圾回收。下一次GC是跑了,就会破坏他们的如果他们都可用。这是一个pretty的大课题,但基本上,永远记得删除所有引用,你会走在正确的方向。

In AS3 you can not destroy objects. All you can do is remove all references to them, which makes them available for garbage collection. The next time the GC is ran, it will destroy them if they are available. It's a pretty big subject, but basically, always remember to remove all references and you will be going in the right direction.

请记住同样,code仍然可以在可用的GC,有点奇物执行的,但重要的是要注意的。

Keep in mind also, that code can still be executed in objects that are available for GC, sort of odd, but it is important to note.

这篇关于破坏Flash对象完全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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