PDA

View Full Version : Acceptable Memory Useage for Flash Project



dail
February 13th, 2008, 12:36 AM
Hi,

I'm currently working on implementing in AS3 my AS2 Fullscreen Browser Crossfading Slideshow.

Its pretty much all done, everything works fine. However I am mindful of the amount of memory it uses. Because it is loading in such large images 1920*1200 etc the amount of memory it can use before the garbage collector makes a sweep can hit 80 megs. Is this too much, or is it something I'm just going to have to accept?

I'm pretty sure I'm managing to set all my objects for garbage collection, removing them, setting them to null, removing their listeners and setting all var references to them to null.

Whats the least memory intensive approach for dealing with large bitmaps in Flash? Currently I access the loaders.content property as a bitmap, and use that data throughout the rest of my app.

Watching the garbage collector do its thing (via catching the System.totalMemory in various text boxes) and through the OSX activity monitor is pretty interesting.

Ordinathorreur
February 13th, 2008, 01:14 AM
I recently heard there might be a garbage collection bug in Loader... maybe you should take a look into that side of things?

dail
February 13th, 2008, 03:06 PM
interesting. I'll check it out.

dail
February 13th, 2008, 11:05 PM
I managed to solve the memory issue by using bitmap objects and disposing of the loaded bitmap data with each cycle of the slideshow. This approach has dropped the average mem usage down from 45 megs to about 20 megs.