Memory leak, tracing the display objects

Hello all,

I have been having a little problem since last night. I’ve been leaking.
Not sure if this is the right forum for that one, so i’ll talk about my memory leak problems instead.

I have created some flash which is a series of .swf files, and after each one loads, there’s either a button or in-frame loads the next one using the code below. The problem is, its meant to be on a Galaxy tab, or similar, which only has 256mb of RAM.


var welcome:Loader = new Loader(); 
addChild(welcome); 
var url:URLRequest = new URLRequest("1_welcome.swf"); 
welcome.load(url);

stop();

The first swf loads within an HTML file, then automatically loads the next scene (or next swf file). That then has a button which moves onto the third one. The third one connects to 3 others (the products this company offers) and each one of them can only go back to the choices screen. My problem exists because there is not enough RAM to load everything. Once I have visited a product, which reduces available RAM by around 60mb, it crashes if I want to look at another one. Not technically a memory leak, more of an overuse of RAM (or lack of RAM).

It is too late to think about streaming, loading the swf’s (which are full of large flv’s) externally, or having the flv’s separate. The files were due today, got extended till tomorrow morning before giving to the company.

Two fold question. Can I use the removeChild(), because when I try, the loader() is no longer available? And secondly, is there a way to trace all the visible objects, so I can narrow down what is currently loaded and remove by name?

Thank you for any help that can be given. If I can’t get it working, i’ll just submit the files and send them updates once I’ve managed to streamline the process.

Cheers,

atocp