A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Memory management

Threaded View

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    30

    Loader - memory problem

    Hi. I use a loader to import an image into flash.

    Code:
    private var _loader:Loader = new Loader();
    I add a listener and start loading.

    Code:
    _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    
    _loader.load(new URLRequest("bilder/" + e.sökväg + "STOR.jpg"));
    When it's complete I remove the listener

    Code:
    e.target.removeEventListener(Event.COMPLETE, loaderComplete);
    And I do absolutely nothing with the loaded image, I don't add it to
    the display list or anything. But when I use the unload() method on the loader it doesn't disappear from memory! Even if I set the _loader = null it doesn't free up the memory!

    What the f*** is wrong? Any help would be deeply appreciated!

    I check the System.totalMemory property and it just keeps stacking up if I repeat the process.
    Last edited by TwinPeaksBob; 05-06-2009 at 01:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center