如果有人能够明确解释Object类中finalize()方法的两个javadoc点,那将非常有帮助:
1. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked.
“用户可见同步”有什么意义?除了“用户可见”的同步,还有其他同步方式吗?
2. The finalize method is never invoked more than once by a Java virtual machine for any given object.
在这种情况下,JVM必须维护每个曾经创建的对象的唯一标识以及其finalize方法已被调用的信息。那么它最终不会超过其存储区域吗?