0
Clearing memory in ActionScript 3.0

/t5/animate-discussions/clearing-memory-in-actionscript-3-0/td-p/3271364
Feb 15, 2011
Feb 15, 2011
Copy link to clipboard
Copied
Does anyone know how to clear memory in AS3.0. My app loads a lot of SWF and the memory usage keep accumulate and does not go down untill the app crash. I've tried flash.system.System.gc(); , set movie clip to null,and removeChild but seems no luck for me.
This is how i trace the memory usage:
var mem:String = Number( System.totalMemory / 1024 / 1024 ).toFixed( 2 );
trace( "RAM Usage: "+mem+"MB" ); // eg traces “24.94Mb”
Any help means a lot to me. Appreciate in advance.
Amir
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guru
,
LATEST
/t5/animate-discussions/clearing-memory-in-actionscript-3-0/m-p/3271365#M85474
Feb 16, 2011
Feb 16, 2011
Copy link to clipboard
Copied
This article should give you more insight:
http://www.rgbeffects.com/blog/uncategorized/flash-optimization-freeing-memory/
It`s also memorable that manually calling the GarbageCollector only works in AIR and the Debug-Version of the Flash Player.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

