It would be useful if someone could correctly clarify 2 points from the javadoc of the finalize () method in the Object class:
1. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked.
What is the meaning of user-visible synchronization? Is there any other synchronization besides the "user visible"?
2. The finalize method is never invoked more than once by a Java virtual machine for any given object.
In this case, the JVM must support the unique identification of each object ever created and the information that the finalize method called. Will it not ultimately grow outside the region in which it is stored?
source
share