如果我重写 Finalize() 并引用一个对象会发生什么。该对象会被垃圾收集吗?从内存中清除该对象的其他方法是什么?
最佳答案
来自Javadoc :
The finalize method may take any action, including making this object available again to other threads.
但是:
The finalize method is never invoked more than once by a Java virtual machine for any given object.
关于java - 重写finalize(),引用其中的对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29873114/