So there is no way to fire the garbage collector from actionscript?
This seems odd to me if that is the case. If the flash applications
performance is dependent partly on how well the garbage is taken out,
wouldn't there be a class made for that so we can control it? Or is
it too risky to be messing with that part?
Just curious.
Karl
On Jan 6, 2010, at 5:02 PM, Henrik Andersson wrote:
Event listeners will be destroyed along with the object the
listeners belong to. But they will keep on firing until the garbage
collector feels like running.
Do note that a listener does hold a reference to the listener
function from the event source. This means that if the object has a
listener on some object that is not up for garbage collection (like
the stage), it is not going to be garbage collected either. That's
why there is a fifth argument to addEventListener.
So yeah, removing the listeners can be needed in some cases, and
not needed in other cases. Either way, it is good practice to do
remove them.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders