Detecting Memory Leaks in ActionScript-3 Project

First is to establish if you actually have a memory leak. For that, I would recommend using a performance stat tool that gives you real-time feedback on your memory usage.

One of the best ones that I've used is Mr. Doob's Stats tool:

Screenshot
(source: mrdoob.com)

Just add it to the stage with

addChild( new Stats() );

And you'll be able to watch your memory usage in real-time. Perform different actions to see what is causing the memory leak (is it just when you click on these buttons, or every frame, etc etc).


The suggestion for Mr. Doob's Stats tool is a good one. Additionally if you are developing using flex builder professional you can use the built-in profiler. (your project does not have to be an actual flex project, you can develop pure as3 projects as well and still use the profiler)