How to get an object's references through JVM
Hi,
I am performing some runtime program analysis and would like to know at exactly what point an object becomes "unreachable".
For example, I have a Testing Program (TP) and a Program Under Test (PUT) containing a set of classes. For each object o created by the PUT, TP maintains an object reference to it. At some point later, if TP decides that the only reference to object o is from TP (i.e., o is pointed to by some object out of the scope of PUT), then object o is considered to be "dead" (although it is not real garbage from the GC's point of view).
Hence, I am wondering if it is possible for any given object, to retrieve all the references that are pointing to it. If I am able to do this, maybe I can know whether the reference from TP is the only reference to an object in PUT.
Thank you and have a nice weekend,
-- Sunny

