This content has been marked as final. Show 7 replies
I'm not sure if it's considered rude to bump a message so please forgive if I've done something that's considered bad forum etiquette.
Any replies to my original message would be well appreciated. Thanks!!
you can monitor the display list but that doesn't make much sense in the present context: if you want something gc'd, it must be removed from the displaylist. you surely won't detect something being gc'd by monitoring the displaylist.
in general, you must know to what displayobjectcontainer you added your display object or you can't remove it. and if you know that, you must use removeChild() or removeChildAt() to remove it.
you could check the numChildren property of your displayobjectcontainer, but that would be a pretty crude way to determine if a particular object has been removed from that displayobjectcontainer.
For anyone who is curious on seeing what is being added and removed from the display list, here is the code:
that won't trace the display list. it only traces the objects attached to the stage, empty and myLoader which is very specific to your application.
the following function will trace the names of all objects in the display list:
Unfortunately there is no way to monitor the garbage collector, which is the only sure fire way to determine whether something has been GC'ed. Rumour has it this may be introduced in the Flash 10 player, but it's just a wish list entry for now; one can only hope.
Silly me. And here I thought I was so smart figuring it out. Oh well... you are way better at this than me kglad!! Thank goodness for people like you who set people like me straight.
I'll mark yours as the answer... and at some point I'll get around to testing it. But I'm done for the night (1:30am yikes!!) so testing will have to wait!!
Thanks for the code!! You're great!!
And thank you Joe for your reply.
(and hey, if you solved your problem, you deserve some rest.)