I am using ModuleLoader to load swf files in my application as follows:-
private { moduleInfo = ModuleManager.getModule(modulName); moduleInfo.addEventListener(ModuleEvent.READY, renderModule); moduleInfo.addEventListener(ModuleEvent.ERROR, handleError); moduleInfo.load(); } { moduleToBeLoaded = moduleInfo.factory.create() as Module;
moduleToBeLoaded.width = containrOfTheModule.width; moduleToBeLoaded.height = containrOfTheModule.height; containrOfTheModule.addChild(moduleToBeLoaded); } The call to loadModule is made as follows:- loadModule( "SummaryApplication.swf");
So far so good. The problem is that when I unload a module, I don't think it is being unloaded properly since I cannot see the reduction in the memory usage. On the contrary what I am seeing is a continuous increase in the memory as these modules are loaded and unloaded. So if I continue switching between two swf files, the memory footprint continues to increase. Unload is as follows:-
private {
containrOfTheModule.removeAllChildren(); null; trace("unloading"); } if(null!=moduleInfo){ moduleInfo.unload(); } }
Please advise how can I fix this?
North America
Europe, Middle East and Africa
Asia Pacific