what will the Finalizer thread do if there is a infinite loop or deadlock in the Java finalize method
what will the Finalizer thread do if there is a infinite loop or deadlock in the Java finalize method . The spec writes: Before the storage for an object is reclaimed by the garbage collector, the Java Virtual Machine will invoke the finalizer of that object. The Java programming language does not specify how soon a finalizer will be invoked, except to say that it will happen before the storage for the object is reused. I read this to mean that the finalizer must have completed before the storage may be reused. The Java programming language does not specify which thread will invoke the