This content has been marked as final. Show 7 replies
You are at the mercy of the Flash Player on how it will ultimately do its garabage collection. You can't force the Flash Player VM to free up memory. A better test would be to load and unload a large number of images and see how the memory usage charts.
For example load and unload 10 different images in sequence. If the peak of the memory all the images added together then you have something to worry about, if it peaks at about the largest image or a < 2 factor size of the image it probably just fine.
I do not know the Flash Player VM that well to know how the garabage collection works but a better test then just single load/unload is needed.
I have tried that too, but the memory usage only grows with each frame an is never freed
it should be simple, but how in the heck are u supposed to unload loaded content?
Well then its beyond my understanding.
Are you worried about the memory usage because of some issue you are having?
I'm making an application where I load and unload pictures at about once second, so if the unloaded pictures aren't fully removed from the memory, the application will soon enough eat up all of the memory in the cache, freeze the computer, and make the user hate whoever made that movie (me :))
Have you actually frozen a computer?
I have plenty of flickr apps that load tons of images and no issue.
This is still an issue. When I do something similar, I have the same memory leak. Since I am loading huge pictures (2000x1500 jpg) at a time, each time I load one, I use up 15 megs of memory. In AS2.0/Flex 1.5 this was not a problem--garbage collection worked properly. In AS3.0/Flex2.0, memory does not get cleared. At 15 megs a go, I have easily frozen up my computer (that's how I found the problem).
I, too, am going crazy.