unload an swf with out worrying that its leaked memory?
Hi I have a desktop air application that loads swfs in and the unloads them after use.
I use the Loader class to load them in...
My oncomplete method looks like this..
| public function onCompleteHandler(loadEvent:Event){ | |||
| cliploaded = loadEvent.currentTarget.content | |||
| mcToLoadaddTo.addChild(loadEvent.currentTarget.content); | |||
| cliploaded.iniz(); | |||
| } |
On load complete i then start the code in the swf by calling iniz method that I have in it.
Currently when it comes to unloading the clip, to stop memory leaks I call A cleanup method in the swf before I unload....
| if(cliploaded != null){ | |||||
| cliploaded.cleanup(); mcToLoadaddTo.removeChild(cliploaded); | |||||
| cliploaded = null; | |||||
| } |
Is there a means to load a clip where I would not have to worry about nulling everything within the loaded swf?
Thanks
Aidan
