What next time it gets cleared, can I mark an object, in java, collect garbage Can i
I have heard that no one will work to clear the object anymore.
I know that this question has been answered, but in such a way you can go The waste collector sees your reference, you can do it through soft references, weak references and phantom references. For a better explanation, take a look at the java.lang.ref package.
In addition to this there is a good sample to determine when a Phantom Reference Garbage is going to be collected.
Here is the main site:
Comments
Post a Comment