actionscript-3 - AS3 有类析构函数吗?

标签 actionscript-3

我的问题就像标题一样简单,但谷歌搜索并没有给我一个简单的是/否的答案。

AS3 有类析构函数吗?

最佳答案

简而言之:不,事实并非如此。 Flash Player 虚拟机使用垃圾收集器概念。您无法直接控制对象使用的内存(除了像 BitmapData.dispose()ByteArray.clear() 这样的罕见情况),但您应该这样做一些工作使垃圾收集成为可能。当对象死亡时,你不可能自动触发某些东西。

Follow the links to learn more about GC logics.

关于actionscript-3 - AS3 有类析构函数吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6617661/

相关文章:

actionscript-3 - 柔性 : how to control Spark datagrid header-text alignment?

image - 使用as3调整图像大小

apache-flex - 是否可以在ActionScript 3中定义通用类型Vector?

actionscript-3 - 如何处理错误 #2035 : URL Not Found

actionscript-3 - 从外部或从库中导入声音? AS3

actionscript-3 - Actionscript 3,多音轨

apache-flex - 如何从匿名组件中删除事件监听器?

actionscript-3 - ActionScript 中的 E4X

actionscript-3 - 安全错误 : Error #2152: Full screen mode is not allowed.

actionscript-3 - Robotlegs 2 与 PureMVC 相比的缺点