How to destroy object in itself

Viewed 42703

Is there any solution for destroying current instance of object in itself ?

I am looking for something which looks like:

class KillMe {
    ....
    public void destroy() {
        this.getObject = null //this is only for demonstrate my idea
    }

    ....
}
4 Answers
Related