pixelbreaker : AS3.0 Memory monitoring

ActionScript 3.0 has a new method that returns the total memory currently being used by the Flash Player.  It’s pretty useful during refactoring or when your just curious.

var mem:String = Number( System.totalMemory / 1024 / 1024 ).toFixed( 2 ) + ‘Mb’;
trace( mem ); // eg traces “24.94Mb”

Pixel Breaker has a good post that shows you how to convert bytes to Mega bytes.
pixelbreaker : AS3.0 Memory monitoring

Blogged with Flock

One Response to “pixelbreaker : AS3.0 Memory monitoring”

  1. Jonathan Spooner » Blog Archive » - San Diego Flash User’s Group - » Blog Archive » pixelbreaker : AS3.0 Memory monitoring Says:

    […] Hey check out how my post on getswfy.com on Memory Monitoring with ActionScript 3.0 - San Diego Flash User’s Group - » Blog Archive » pixelbreaker : AS3.0 Memory monitoring […]

Leave a Reply

You must be logged in to post a comment.