Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Clearing memory in ActionScript 3.0

Guest
Feb 15, 2011 Feb 15, 2011

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
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 16, 2011 Feb 16, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines