2 Replies Latest reply on Mar 27, 2012 4:55 PM by William Spence

    Profiling for memory leaks

    William Spence Level 1

      In a few months I will be releasing my first AIR application.  The last step for me is to make sure that memory is being used efficiently and isn't leaking.  Up to this point I have never profiled an AIR application and am looking for some guidance because I have so many questions.  For instance, when you create a pop-up, does closing it set all the objects in the pop-p to null and remove all references and event listeners automatically, or do you have to handle that manually?  I have looked around, and except for the occasional blog post, I have not found any really good tutorials or books that specifically describe how to use the profiler.  If anybody could point me to any good video tutorials or books that would tell me how to use the profiler to my advantage to make sure that I am doing everything possible to help the garabage collector to do its job, I would really appreciate it.



        • 1. Re: Profiling for memory leaks
          Flex harUI Adobe Employee

          There is a profiler tutorial on my blog.  It is for the 3.x version, but most of it applies to 4.x as well.


          Nothing gets cleaned up automatically in the framework unless it could cause a leak.  Not everything needs to be nulled or removed as a listener.



          Alex Harui

          Flex SDK Team

          Adobe Systems, Inc.


          1 person found this helpful
          • 2. Re: Profiling for memory leaks
            William Spence Level 1

            Thanks for the reply Alex!  The profiler SWF that you made looks very good and extensive and I will enjoy going over it in detail soon.  It is very cool that you made such a demonstration for the Flex community to use.


            If anyone else has read any books that cover profiling in great detail, I would really appreciate hearing about it.  The more information and examples, the better!!!