well i have found a wierd memory leak but this is getting to be a huge problem for me..
suppose this app: <?xml version="1.0" encoding="utf-8"?> <mx:Application creationComplete="init()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.modules.Module; import mx.events.ModuleEvent; import mx.modules.ModuleManager; import mx.modules.IModuleInfo; public var info:IModuleInfo; public var xi:Module; private function init():void { info = ModuleManager.getModule("a.swf?Versao=1.0"); info.addEventListener(ModuleEvent.READY, modEventHandler); info.load(); } private function modEventHandler(e:ModuleEvent):void { xi = info.factory.create() as Module ; addChild(xi); } public function remove():void { removeChild(xi); info.removeEventListener(ModuleEvent.READY, modEventHandler); info.unload(); info = null; xi=null; } ]]> </mx:Script> <mx:Button x="200" y="176" id="lasal" label="remove" click="remove()"/> <mx:TextInput x="213" y="33"/> </mx:Application> and the module a.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Module xmlns:com="*" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"> <mx:Button x="26" y="153"/> </mx:Module> now my problem: if you run this in profiler and just click at the remove button, the instance of module a is removed without problems.. BUT if you before click the remove button type anything into the textinput and click the remove the instance of module a is not removed... but if then just click the textinput and just type anything else in it (just a space for eg) then the instance of module a is removed... wth ? there is this bug http://bugs.adobe.com/jira/browse/SDK-14781 that is somehow related to this but i tried removing the focus from both the textinput or the button but still came with the same result so...... can anyone help me here ? Thanks