>> How do I unload this Factory instance? I tried to reproduce the issue you, but I don't see any _TestModule_mx_core_FlexModuleFactory hanging behind.
Can you please submit the bug with your test case at http://bugs.adobe.com/flex >> Why are there 2 instances under Loitering Objects when the Cumulative Instance count is only 1? _TestModule_mx_core_FlexModuleFactory (2) doesn't mean that there are two instances. (2) means that there are two back references for _TestModule_mx_core_FlexModuleFactory which means it is being referenced by two other objects in the graph. HTH, Gaurav -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Broce Sent: Sunday, March 02, 2008 1:18 AM To: [email protected] Subject: [flexcoders] Module unloads but FlexModuleFactory instance does not unload I have a simple Module (TestModule) that I can load and unload using ModuleManager in a Flex Application (FlexApp). Profiler shows the following two new Live Objects when TestModule loads: TestModule _TestModule_mx_core_FlexModuleFactory Each object has a total of 1 instance. When I unload TestModule and force a GC, the TestModule instance and memory drop to 0 which is good. However, _TestModule_mx_core_FlexModuleFactory continues to have 1 instance and is using memory. When I grab "before and after" Memory Snapshots in Profiler, the Factory instance appears in the Loitering Objects list. The Object References for the Factory show 2 instances: ------------------------------------------------------------------ Instance Property ------------------------------------------------------------------ _TestModule_mx_core_FlexModuleFactory (2) Function (2) [savedThis] _TestModule_mx_core_FlexMod... moduleCompleteHandler flash.display:LoaderInfo [listner0] Function (1) [savedThis] _TestModule_mx_core_FlexMod... docFrameHandler Instance #2 is coming from the Module loading process and appears to be unloading properly. Instance #1 appears to be coming from mx.core:FlexModuleFactory. However, this code is part of the "generated" ActionScript that I cannot debug. I tried loading TestModule into the "current" App Domain and I also tried loading it into a separate "child" App Domain, however the results were the same. I'm using Flex Builder 3.0 (release). FlexApp is loading the framework.swc as an RSL. TestModule.mxml --------------- <?xml version="1.0" encoding="utf-8"?> <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="200" height="100"> </mx:Module> Questions: How do I unload this Factory instance? Why are there 2 instances under Loitering Objects when the Cumulative Instance count is only 1? Thanks for your help. I am really stuck on this. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links

