'finalize()' should not be overridden
tip
The finalization mechanism is inherently problematic. Finalization can lead to performance issues, deadlocks, and hangs. Errors in finalizers can lead to resource leaks; there is no way to cancel finalization if it is no longer necessary; and no ordering is specified among calls to
finalize
methods of different objects. Furthermore, there are no guarantees regarding the timing of finalization. Thefinalize
method might be called on a finalizable object only after an indefinite delay, if at all.
Thanks for your feedback!