is there a way to find the number of References for a given Object at Runtime.
At runtime, the program would be given the ClassName, from which can we query the JVM Runtime to find how many instances and/or references have been created for this ?
-Srivats
Java Objects passed by Reference ?? -> you are a failure !!
If this is an object you have control over, you can keep a counter that you increment in the constructors. This will count all objects ever instantiated - how many of those are still referenced at a particular point in time is another matter.