----- Original Message ----- From: "Jer Brand" <[EMAIL PROTECTED]>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, April 16, 2008 2:49 PM
Subject: Re: [Flashcoders] Is Adobe fixing this big FP9 problem?


hmmm, that's not so bad... I'm kinda partial to:

       myMovie.forceUnload()
or

       myMovie.noSeriouslyUnload()

Although this also has it's own sort of personal charm:

      myMovie.iDontCareIfYouHaveListeners_DIE_DAMN_YOU_DIE() ;

LOL

In terms of garbage collection, my guess would be that the GC doesn't really know what use an object is being put to, it's just interested in clearing up memory references that are no longer used, so strictly speaking this isn't the GCs fault.

In terms of freeing up references from event listeners, the real problem is in tracking them down. I don't know if there's a single data structure that can be used to find all event listeners - even if there is how easy is it to know that it's referring to an object that belongs to a movie that's going to be unloaded?

My 30 second thoughts about this is that it would require the unload code to compare all event listener targets with objects associated with the movie, then it could forcibly remove those listeners. Sounds pretty hairy to me if you have to do that comparison.

As much as everyone is begging for a forced unload (no matter what,) there's a danger it would introduce another bad problem whereby the developer has left references to the loaded movie in their code after the movie has gone and the whole thing will go kaboom when they are used. I've no wish to return to C++ thanks.

Paul
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to