Java – definition: unfinalized and finalizable objects

In order to understand weak references in Java, I have to refer to the Java language specification The following sections come from section 12.6, which puzzles me:

So what are the formal differences between unformed and terminable objects? From the reference point of view, if unfinished and finalization are different, then for an unfinished object, it must be the case that the JVM may eventually call its finalizer A little confused or I still have some English semantic learning;)

Link to the section in the Java specification: implementing finalization

Solution

The difference between an unterminated object and a finalizable object is that the finalizer on the second object can be called automatically at any time in the future, while the finalizer on an unterminated object cannot be called automatically unless the object becomes finalizable first

>In this state, objects that are not terminated will not be able to call their finalizers automatically by the JVM > finalizable objects can eventually call their finalizers automatically by the JVM

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>