-
1. Re: Flash grinding to a halt because is not unloading media
Andrei1 Sep 8, 2009 8:34 AM (in response to SlickRik)removeChild is not sufficient.
You need to remove all the references to the objects you mark for GC and nullify them, especially care must be taken about removing event listeners.
-
2. Re: Flash grinding to a halt because is not unloading media
Andrei1 Sep 8, 2009 8:37 AM (in response to Andrei1)Also this article may be helpful:
http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html
-
3. Re: Flash grinding to a halt because is not unloading media
SlickRik Sep 9, 2009 5:59 AM (in response to Andrei1)hmm, good article which makes sense.
i'm using removing the container from the stage using removeChildAt()
and then reseting the array that stored the references to the items that were within the container.
there don't seem to be any other references, the loaded objects are not referenced or passed around outside of the container
if you can't force garbage collection can you adjust the threshhold or what triggers it.
I am, at this stage, unsure whether the items are marked for collection but it isn't firing or it it's firing but they're somehow (as you say - likely through being referenced) not being marked.
is there any way to track an objects reference count?
-
4. Re: Flash grinding to a halt because is not unloading media
Andrei1 Sep 9, 2009 6:16 AM (in response to SlickRik)How about loaders themselves? Do you remove listeners from them?
Also, when you reset array, do you nullify objects that were in this array and remove listeners?
GC is a total black box. You can force it by overwhelming memory but, again, if the objects are not removed for other reasons - it will make things even worse.

