On Wed, 12 Apr 2023 19:16:14 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> The interaction of Finalizable, FinalizableObject, Finalizer, and 
> FinalizerThread is hard to follow,

These classes implement a cleanup-at-vm-exit mechanism, which uses `finalize` 
as the cleanup method. It is unclear if the classes that implement 
`FinalizableObject` can actually get cleaned up before VM exit through normal 
GC and execution of finalizers. Simply adding a Cleaner does not provide the 
cleanup-at-vm-exit functionality. You need to rename Finaliz* to Clean* and 
keep all these classes, as well as adding a Cleaner - which should be done as 
part of CleanableObject.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13420#issuecomment-1506435408

Reply via email to