Question

I also found this topic but it doesn't fix my problem other topic

I have a module loader that load other swc's but when I look at the memory off the application it seems that each time a module gets loaded the previous module doesn't get unloaded and so the memory increases..

This is how I load the modules:

  <module:ModuleViewLoader id="moduleViewLoader" moduleManager="{presenter.deviceModuleManager}"
                             top="0" left="0" right="0" bottom="0"
                             moduleId="configurationView"
                             height="100%" 
                             width="100%" enabled="{presenter.deviceLoadable}"
                             ready="presenter.handleModuleLoaded(moduleViewLoader.loadedModule)"
                             error="presenter.handleModuleLoadError(event)"
                             unload="presenter.closeConfiguration(event)">
        <module:loadPolicy>
            <module:BasicLoadPolicy/>
        </module:loadPolicy>
    </module:ModuleViewLoader>

When leaving the module I do this:

public function resetModuleSpecifications():void {
        closeConfiguration();
        changewatcher.unwatch();
        loadedModule = null;
        lastLoadedDevice = null;
        deviceModuleManager=null;
        deviceBeingConfigured = null;
         }

But it seems that the module loader doesn't unload the object in his memory. but the unload event is triggered, anybody any idea? How to remove the object from the module loader

Was it helpful?

Solution

There can be several reasons why a module stay pinned in memory, the best you can do is read this excellent blog entry by Alex Harui : http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

It should help you fix your problem unless you found a new bug :)

Hope that helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top