2 Replies Latest reply on Jul 3, 2009 7:59 AM by *Prashant Shelke*

    How to dispose custom object?

    EricJ32

      Hi,

       

      I'd like to destroy an object so it's no longer being held in memory. It's a straightforward custom class called ExpenditureItem, with only a couple of methods and properties.

       

      So, I'd like to do something like:

       

      public function dispose():void

      {

           //remove this object completely then ...

           System.gc();

      }

       

      How do I go about that? I'm pretty sure running System.gc() won't do anything until I've alerted it to the fact this object is ready for collection...?

       

      Thanks for your help!