See the post on my blog about unloading modules. Most of the principles apply. Most likely the StyleManager issue is your problem.
Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of sebi2706 Sent: Wednesday, October 21, 2009 5:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] SWFLoader unload function only free up my memory the second time Hey Folks, I'm working on a big portal project which uses subapplications, these are loaded using the SWFLoader control, I know there many issues with unloading subapps and I have carefully removed any listeners, references before unloading. However, the profiler shows me the memory is not freeup the first time, if I load the subapplication again, the memory incresases again but when I unload, the second trunk of memory that was allocated is made free again : 1. memory is 0, I load the sub app first time 2. memory is 1, I unload the sub appp 3. memory is still 1, I load the subapp again 4. memory is 2, I unload the sub app 5. memory returns to 1. So it seems that the first time may subapp construct references with my main app (Manager Singleton classes maybe?) that made it not ready to be GCed. Any ideas on this issue ? Thx, Bas