public class FinalizerHandler extends Object
FinalizerHandlerclass implements the functionality to register
Finalizers and call them at some point in time, such as the end of the current
|Constructor and Description|
|Modifier and Type||Method and Description|
Calls all registered
Unregisters all registered
public void registerObject(Finalizer object)
object- the finalzier to register
public void unregister(Finalizer object)
Finalizerobject. After unregistering the objects
doFinalize()method is not called anymore.
Finalizerobject to unregister.
public void unregisterAll()
Finalizerobjects so that a subsequent call to
callFinalizers()effectively does nothing.
public boolean isEmpty()
Finalizerobjects are registered yet.
public void callFinalizers()
Finalizer.doFinalize()method, and removes them from the internal list.
The call to the
Finalizer.doFinalize() is not expected to throw
any exceptions or even errors. In case a
Throwable is thrown
this is logged as an error and processing continiues with the next
Finalizer to be finalized.
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"