Skip navigation
Ralf Eversen
Currently Being Moderated

Memory leak using ModuleLoader

May 20, 2009 6:36 AM

See attached example project. When loading and unloading the simple module several times, the memory use keep increasing. I used the profiler in Flex Builder (3.0.2) to see what is going wrong and the FlexModuleFactory is not garbage collected at all. On system level, this means that evere time the module is loaded, the memory use increases with about 3mb, which is never released until the application is quit. I use Flex SDK 3.3.0 and tried it with the latest Flash Player and Flash player 9.0.124. To import the project in Flex Builder, rename it to a .zip extension.

Attachments:
 
Replies
  • Currently Being Moderated
    May 20, 2009 9:55 AM   in reply to Ralf Eversen

    All references to classes and objects in the module must be broken in order for the module to go away.  Use the profiler to see what is hanging onto the FlexModuleFactory

     

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc.

    Blog: http://blogs.adobe.com/aharui

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2009 8:49 AM   in reply to Ralf Eversen

    Not sure I'll have time to look at your code.  See my modules presentation on my blog.  Setting the module to null only frees one reference to it. Any other references keep it around.

     

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc.

    Blog: http://blogs.adobe.com/aharui

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points