Is it possible for a class to essentially set itself to null? I need someway to run a function on a class and have it terminate right after.

Running into infinite loop problem, and I figured out why.. i need to destroy the class when i'm done with it.

is it possible?