The follow on work to adding the Cleaner is to replace uses of finalization with uses of the Cleaner. For the 'easy' cases in the java.base module, it is useful to introduce a private Cleaner for the java.base module. It is proposed to be held weakly, to allow it to terminate on a lightly loaded
system.

Webrev for Review:
http://cr.openjdk.java.net/~rriggs/webrev-cleaning-factory-8146028/


The 2nd step is using the Cleaner.
- Empty finalize methods should (I think) be removed; but since they are part of the public spec the process needs two full releases; so the proposal is to deprecate them first. (The JEP 277 necessary changes will be updated when JEP 277 semantics are finalized)

- In a few cases, the code in the finalizer is redundant and if removed would allow an optimization of the handling of the finalizer and future removal of the finalize method.

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-cleaning-finalizers/index.html

Thanks for comments and suggestions,  Roger




Reply via email to