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 ...
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!
just set all references to that object instance to null, use weakReferences = true when you about to add Event Listener to your class to be disposed,
if you use Dictionary class, instantiate it using new Dictionary(true);
Calling System.gc() is useful only in debug version of flash player.