It'd be helpful if anyone could clarify properly on the 2 points from javadoc of finalize() method in 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 significance of 'user-visible' synchronization? Are there any other synchcronization apart from 'user-visible'?
2. The finalize method is never invoked more than once by a Java virtual machine for any given object.
In that case, JVM must maintain unique identity of each and every object ever created vs the information that its finalize method has been invoked. Wouldn't it ultimately grow beyond whatever region it is stored in ?