ActionScript Clean Up
Posted
by TheDarkIn1978
on Stack Overflow
See other posts from Stack Overflow
or by TheDarkIn1978
Published on 2010-05-29T21:07:32Z
Indexed on
2010/05/29
21:12 UTC
Read the original article
Hit count: 361
actionscript-3
|clean-up
i want to deallocate a spriteClass from memory and remove it from the display list.
when the spriteClass is instantiated, it creates some of it's own sprites with new tweens and tween events and add them as children. i understand that the tween events must be removed in order for the spritClass to become available for garbage collection, and only afterwards should i nullify the spriteClass, but should i also nullify and remove the spriteClass's sprite children and tweens as well, or does it not matter?
essentially i'd like to know if by nullifying the spriteClass it automatically removes all of it's added children and new instantiations like tweens, sprites, rects, whatever, or am i responsible for removing them all and otherwise the spriteClass isn't truly null until i do so?
© Stack Overflow or respective owner