I know that this = null
is illegal.
I\'m wondering if there\'s some other way to have an object clean itself up.
my desire is to be able to do some
This neat question is technically interesting. However, considering your intent: You are attempting to force the condition of all references being null
so that you can guard against the invalid use of an otherwise expired instance.
It is bad practice to assign any meaning to null
.
Instead, modify (or facade if you can't modify) your A
object so that some other flag is available. For example public boolean isClosed() ...