I want to know how many references to Java objects have any way to check. As far as I am using JVMi through a JNI interface, I can see the only way. Is there a pure Java (without using a native library) solution to get this information?
We are developing educational tools for data structure animation (some algorithms will be used for the implementation of students), so it will be very good if we use the "release" objects as the most non-intrusive pathways (I'm trying to avoid the user's use of this tool in order to update data such as Object Released (Objerfed) data structure animation Paddet, delete an element or some similarities)
From your description, it seems that you Less care about actual calculations References to find out if only one object is collected. If this is the case, then you decide that when the referenced object is ready to finalize, we can use the WeakReference or PhantomReference.
- Javadoc for WeakReference:
- Garbage collector callback:
-
- Hope this helps.
Comments
Post a Comment