PDA

View Full Version : Delete Class Instance


The Little Guy
02-01-2009, 06:19 PM
How can I delete an instance of a class?

I have a function that creates a class, and at the end of the function I would like to delete/remove/destroy the instance. How do I do it (if it is possible)?

thearc
02-01-2009, 06:40 PM
If you are trying to just delete an instance you can just remove the child by name.


removeChild(getChildByName("instance name"));

The Little Guy
02-01-2009, 06:50 PM
Nope, that isn't what I am looking for.

I wrote a class, then in the class, I created an instance of the class in the beginning of a method, now I need to remove it when the method completes.

Flash Gordon
02-01-2009, 07:05 PM
instance = null;