Once again a question about the garbage collector in actionscript-3:
If I have a master container:
var masterContainer:Sprite = new Sprite();
And then I add a child to this container:
var childImage:Sprite = new Sprite();
masterContainer.addChild(childImage);
addChild(masterContainer);
And, I then decided to let the garbage collector collect the master container and all it's contents, will this be enough?
removeChild(masterContainer);
masterContainer = null;
Or do I have to store all child images' references somewhere just to be able to remove their childs from the master container later?
Also, would it be possible to let the garbage collector log a message when it deletes something and what exactly it is deleting? Somekind of event maybe?