On Sun, 7 May 2023 22:17:56 GMT, David Holmes <dhol...@openjdk.org> wrote:

> This is a tricky issue to solve cleanly and minimally. If every class 
> extended FinalizableObject then all the implementation could go there, but we 
> have to try and split things across FinalizableObject and Finalizable because 
> some classes only implement the interface - this leads to some unfortunate 
> design choices.
> 
> I think a better design for the classes that can't extend FinalizableObject 
> would be for them to contain a FinalizableObject, the cleanup action for 
> which would cleanup the host object. That could allow the removal of the 
> Finalizable interface and simplify the general usage patterns. But that may 
> be going too far for this particular PR ... ?

Please, continue this discussion on the new PR: 
https://github.com/openjdk/jdk/pull/13884#issuecomment-1539796995. Thanks!

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

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

Reply via email to