Saturday, 5 September 2009

Memory usage in AS3

Over at pixelbreaker.com I found a useful piece of code which displays the memory used by the Flash Player. Only two lines of code are needed for displaying the memory. The System.totalMemory property is used to calculate the how much memory is being used by the computer. This code can be very useful with large Flash projects where many instances are being used. You can use this code to optimise the areas of your project which are take up too much memory.

I have also found two more useful memory monitoring tools from chargedweb.com which are called: ResouceMonitor and Cache. These two tools are both Actionscript 3.0 Classes. The ResourceMonitor class monitors the resource usage of the ram, cpu, and frame rate. While the Cache class monitors the memory and forces cleaning. You can define a usage limit and the Cache class will clear the memory when it has reached the limit.

For more information on memory usage checkout an article written by gskinner where he discusses Actionscript 3.0 resource management.

0 comments:

  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP