Jump to content
Search Community

Video Loader garbage collection

Guest renwardp
Moderator Tag

Recommended Posts

Guest renwardp

Hi Jack,

Thanks again for your gs classes, they are incredible.

I have a problem with the videoLoader. Im building an app in AIR, the main app loads different swf files for each section. I have a method to dispose the loaded swf when the swf loader loads a different file. That works without any problem, the thing is that when I load a swf that has a videoLoder in it, the file it's no completely removed for garbage collection. As Im using the flash debugger I can see when the swf file its removed.But when I use the videoLoader the swf file its not removed. It's a little confuse to me. In my dispose method I use the LoaderMax.getLoader("the file").dispose(true), and the video its removed but still the sfw that contains this video can't be unloaded. I'm using a mp4 file should I change to fly? or what can I do to solve this problem.

 

Thanks!!

Link to comment
Share on other sites

Keep in mind that SWFLoader cannot possibly know what code you're running inside the subloaded swf and clean up after you, so if you're doing things like starting sounds or videos/NetStreams, adding listeners, etc., you should clean up after yourself. In your example, you should dispose(true) your VideoLoader first, then dispose(true) the parent SWFLoader. You could use the technique described here to automate things a bit:

viewtopic.php?f=6&t=4212&p=16730#p16730

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.
×
×
  • Create New...