Posted At : March 19, 2007 11:18 PM 3 Comments
While digging around the Flex 2 Langauage Reference I came across the System.totalMemory property.
According to the livedocs this gives:
The amount of memory (in bytes) currently in use by Adobe® Flash® Player.
This is a useful tool for monitoring memory usage while developing your applications and spotting memory leaks. To assist me in this for a current application I'm working on I created a very simple MemMon component. (Live Demo)
To use the component: 1. Download the MemMon.mxml component code to your system.
2. Create a new application in the same directory as the component
3. Paste in the following code with the following code:
4. Compile the application and enjoy.
Note: This does not report the memory for just your current application - it reports memory for the entire flash player - i.e. all open flash movies.
3 Comments
Very useful indeed.
Thanks!
Marko
I get the following error on line 20 MemMon.xml
Element type "historyPoints" must be followed by either attribute specifications, ">" or "/>".
thanks
I got the same error. You have to wrap the contents of the script tag in CDATA tags.