Jump to content


Loaders not removed from memory

Moderator Tag

Recommended Posts

Hi there,


First off I would like to say the work you have done thus far is awesome!


I'm really hoping you can help me as I feel ive been banging my head against the wall the last couple of days.


I have a project that will be running a video playlist, I want to remove a video once it has finished playing but the loaders, contentDisplay, video etc are still kept in memory when it try disposing of them.


So over time the project maxes the memory and I am left with the big "!".


I have gone through and stripped event listeners, and everything i can think of that may keep it in memory.


I really hope you can point out what is going wrong.


Attached are simplified versions of what im trying to do.



Link to comment
Share on other sites

Just a few questions first:

  1. Are you saying that after you call your destroyQueue() method, all of the VideoLoaders, ContentDisplay objects, etc. remain permanently in memory?
  2. Are you saying that the example set of files that you posted reliably reproduce this issue? I just have to press the "END" key?
  3. Are you using the latest version of LoaderMax?
  4. How are you tracking whether or not things are garbage collected properly?

Link to comment
Share on other sites

Thank you for the quick response, my apologies for the lack of information.


1. Yes

2. I have tested extensively yes. "End" is the trigger, it was happening when the videos finished, but i removed the listeners for debugging.

3. I believe i am yes, i have included the swc into the project.

4. I am running the project in flash develop, and using the profiler to examine the objects

Link to comment
Share on other sites

Last question: have you tried publishing and profiling with something other than Flashdevelop? I have heard of some bugs/issues with their debugger that might be causing the odd behavior (or not).

Link to comment
Share on other sites

I have run the same code through FlashBuilder, the issue still occurs (see attached for profile output, when 'destroyQueue()' has completed)


Link to comment
Share on other sites

As far as I can tell, it's not an issue with VideoLoader, but maybe you're not waiting long enough for gc to kick in. I just ran your code (and some similar) and I did see some instances hanging around until I hit the "gc" button in the profiler which did indeed cause things to get cleaned up. I also added more and more instances and watched if they ever got gc'd and they did eventually, but Flash's gc routine is difficult to predict in terms of timing. It runs when it decides to. I have attached 2 screen captures of the profiler showing that things are getting gc'd.


I'm not quite sure what to advise here regarding your app, but this does seem to indicate that the problem isn't with VideoLoader/LoaderMax. I wish I had a simple answer for you :(



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.