4 Replies Latest reply: Sep 9, 2009 5:59 AM by SlickRik RSS

    Flash grinding to a halt because is not unloading media

    SlickRik Community Member

      hi guys,

       

      i've a got a huge (relatively) problem ni that i've created a Flash app with a dynamic data structure which ends in 150 different nodes.

      each node (if visited) loads in between 5-10 images and a couple of movies.

       

      The data for each node and its consequent external media are all displayed in the same visual class that is only instantiated once.

      The display object that contains the jpgs and movies is cleared of all child objects before the next node loaded.

       

      Yet the size of the flash file (according to windows task manager) never shrinks and very soon reaches 1mb in size at which point it starts to chuc badly.

       

      It's my understanding - even though i'm using 'removeChild' on each object and resetting any references to the said child objects - that they are not being removed from teh cached memory and for whatever reason not being picked up/emptied by the garbage collector?

       

      Does this sound about right?

       

      If so, can anyone suggest HOW i can make it so that the loaded media is removed from memory when it is element is removed (removeChild etc)

       

      All help greatly recieved as this project is due to be delivered later this week!

       

      regards, Rich

       

      Ps.  running on Windows XP SP3, Firefox, FlashPlayer 10, Flash CS4 published for Flash player 9, written in AS3, all external meia is *.jpg and *.flv