4 Replies Latest reply on Mar 31, 2011 1:19 PM by Flex harUI

    Problems unloading Module

    iamcootis Level 1

      So we have a project that has two states a 'Welcome' state and a 'Module' state.


      We have two types of modules. One module is of type TestLab which is a component we've created. The other type of module is a blank view that will show popups as they're called.


      The problem we're having is very strange and hard to pin-point.


      If we load TestLab A, then unload TestLab A, load TestLab B, unload TestLab B, load TestLab A......all the modules are cleaned up properly.


      But if we go from TestLab A, to welcome screen, back to TestLab A....TestLab A will not have unloaded the first time and we'll have double modules, although we're calling the exact same code to unload and load the module.


      It's also the same thing if we go from TestLab A -> other module - > TestLab A.


      Although if we go to TestLab A -> welcome -> TestLabB -> TestLab A, everything is cleaned up properly.


      So it appears in order for a module to be properly unloaded and released from memory, we must load a different module of about the same size.


      Anyone have any idea what may be the culprit. It's just very strange to me that modules can be unloaded and released sometimes, while other times they hang in memory depending on what module was loaded after it.