Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-26167

ModuleLoader.unloadModule() function doesn't make a call to moduleInfo.release() which leads to the module being stuck in memory when reloaded

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK 4.1 (Release)
    • None
    • Modules
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Compile the application and module.
      2. Run the application.
      3. Press the "Load Module" button.
      4. Press the "Unload Module" button.
      5. Press the "Load Module" button.
      6. Press the "Empty String Module" button.
      7. Press the "Load Module" button.

      Actual Results:

      The module is stuck in memory when reloaded (step 5) due to not removing the moduleInfo reference when calling the unloadModule() (step 4). It is caused because when you call unloadModule it calls unload() on the moduleInfo but does not call release() which substracts its reference. Then the calculation of the actual references will be wrong by +1 each time you call the unloadModule().

      This could be observed with: watching the network traffic (when module is stuck in memory it doesn't transfer over the network, watching the events (when stuck there is no progress event before the setup event) and also the easiest way if the module is big and takes time to load, when it is stuck in memory it loads right away and when not you wait till it loads (with disabled cache).

      Expected Results:

      The moduleInfo.release() to be called along with unload() so that moduleInfo could correctly count the references to the module.

      Workaround (if any):

      On the unload event of ModuleLoader call event.module.release().

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: