Share Posted June 14, 2013 Hi,First, thanks for the great products. Greensock is the first 3rd-party tweening library I've used, and I love it.I have an AIR application that contains about 25 videos. Every time we play a video, we unload the last video. The problem is the video object is not being garbage-collected after we call unload. It's staying in memory. By the time we've played all 25 of our videos, memory is approaching 1.5 gigabytes and our program crashes.This is how we create the VideoLoader: vloader = new VideoLoader(config.videoAPI+videofs, {name:"video_"+ys+"_"+i, scaleMode:"stretch", load:false, autoPlay:false, smoothing:true, bufferTime: 2}); This is our code to unload it: video.loader.cancel(); video.loader.unload(); video.loader.dispose(true); I imagine all three lines are overkill, but we are trying everything.Could it be an eventListener that is preventing the memory from being freed?Thanks,Bob Link to comment Share on other sites More sharing options...
Share Posted June 14, 2013 Yep, dispose(true) should be all you need (that also calls cancel() and unload() if necessary internally). And yes, you should definitely remove event listeners in order to clear things for GC. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now