1 Reply Latest reply: May 4, 2010 4:39 AM by dmeN RSS

    How to find Memory Leak in AS3

    Prasad Kawte

      Hi ,

       

      I have created a  flash game includes huge amount of memory usage . I want to find out the objects remain in the memory , Is there any way or tool through which i can find the unused objects and force GC on them ?

       

      Regards ,

      Prasad

        • 1. Re: How to find Memory Leak in AS3
          dmeN Community Member

          There's De Monster Debugger: http://www.demonsterdebugger.com/

           

          FWIW - most memory leaks I've seen are the result of using strong referenced listeners - ie:

           

          someObject.addEventListener(Event.ENTER_FRAME, someFunction);

           

          as opposed to:

           

          someObject.addEventListener(Event.ENTER_FRAME, someFunction, false, 0, true);

           

          With a game where you potentially add all kinds of objects to the screen dynamically, you really need to be careful and use weakly referenced listeners.