RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

Andrew Haley aph at redhat.com
Wed Nov 25 12:54:32 UTC 2015

On 11/25/2015 12:39 PM, Peter Levart wrote:
> What do you think?

It's very problematic.  First off, collection often clears the young
generation altogether, promoting everything.  Secondly, I think we are
already short of header bits in some cases.  Thirdly, this requires
all collectors to be changed.  Fourthy, some collectors don't use
multiple generations: they can just allow a dense prefix to pile up at
the left-hand end of the heap which they don't bother to collect.
Etc, etc...


More information about the core-libs-dev mailing list