Posted By:
John_Mitchell
Posted On:
Sunday, June 17, 2001 02:50 PM
I'm confused by your question. If there are no more references to an object then, by definition, any previous references to it are, in essence, already null.
Anyways, the answer to the general question of how figuring out how many references exist that refer to a specific object is... No, you can't figure that out in the general case in pure Java.
Note that if you only care about classes/objects which you create then you can always wrap your actual objects but that introduces its own problems.