On 5/9/08, Gregor Kiddie <[EMAIL PROTECTED]> wrote: > From the docs… > > "Unloads the module. Flash Player and AIR will not fully unload and garbage > collect this module if there are any outstanding references to definitions > inside the module." > > Which is what usually causes us the problems. [snip]
About the memory thing: I had the problem of loaded SWFs not being fully garbage collected. So I created a framework for cleaning up on unload. It's very simple, and I've described it in this post on the AIR list: http://tech.groups.yahoo.com/group/apollocoders/message/2766 Basically, when you get the unload event for your module/application SWF, you should: 1. Stop any running timers 2. Remove any 'enterFrame' event listeners 3. Close any open network connections 4. Remove any objects added to the stage 5. Remove any event listeners from the stage 6. Call dispose() on any BitmapData objects 7. Stop any sound that's playing and close the stream ... and so on. You get the DisposalManager to call dispose() on each of your objects on SWF unload, and the dispose() implementation is where you do the above. Also see Grant Skinner's article here: http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html Manish ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/