R – How does Flex/Flash free its memory

apache-flexflashuser interface

What is the best way to Free Memory in Flash ? Does it have a Garbage Collector ? How to invoke that GC ? How to make Objects applicable for Garbage Collection ?

I have a Website which displays a lot of charts. I observe that the memory that the IE uses while we display these charts continues to increase and sometimes reaches around 500 Mb. I always reinitialise unused Objects to NULL.

Best Answer

AS3 has a built-in GC. Arguably the best resource on how it works are Grant Skinner's articles on the subject:

http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

You can use the Flex profiler (Flex Pro only) to get a feel for how the garbage collection works. The profiler displays what objects are currently in memory and has an option to force garbage collection at the click of a button, making it easier to determine which of your objects are eligible for garbage collection at a given time.

Related Topic