No, It is Immpossible. Also not necessary.
An object will have the right to garbage collection (actually freed) as soon as it is inaccessible to one of the root objects. Basically, self-references do not matter.
Just make sure you never store references to objects that you will no longer use, and the rest will be handled by the garbage collector.
Regarding your editing:
Edit: var1 and var2 refer to an object of this class, when I delete var1 by doing var1 = null, I want var2 to be deleted too.
You cannot force another object to refuse the link. You must explicitly point this to another object. For example, if you are implementing a linked list (as it looks in your example), I would suggest you add the prev link and do something like:
if (prev != null) prev.setNext(next); // make prev discard its reference to me (this). if (next != null) next.setPrev(prev); // make next discard its reference to me (this).
source share