ActionScript 3删除对象函数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3删除对象函数相关的知识,希望对你有一定的参考价值。

This function will delete and object and mark it for deletion with gc.
  1. /**
  2.  * _deleteObject function
  3.  * Removes the specified object from the parent object and nulls the object.
  4.  *
  5.  * @param obj:Object The specific object to remove
  6.  */
  7. private function _deleteObject(obj:Object):void
  8. {
  9. if (obj.parent)
  10. obj.parent.removeChild(obj);
  11. obj = null;
  12. }

以上是关于ActionScript 3删除对象函数的主要内容,如果未能解决你的问题,请参考以下文章