JDK-8027351: (ref) Base's class finalize method not invoked if a private finalize method exists in its subclass
jeroen at sumatra.nl
Sat Nov 2 08:43:32 UTC 2013
Hi Mandy (and Mark),
The getter can be optimized away, the static field can't, so this is probably a tiny bit more expensive.
> -----Original Message-----
> From: core-libs-dev-bounces at openjdk.java.net [mailto:core-libs-dev-
> bounces at openjdk.java.net] On Behalf Of Mandy Chung
> Sent: Friday, November 1, 2013 22:11
> To: mark.reinhold at oracle.com
> Cc: core-libs-dev at openjdk.java.net
> Subject: Re: JDK-8027351: (ref) Base's class finalize method not invoked
> if a private finalize method exists in its subclass
> On 11/1/13 1:37 PM, mark.reinhold at oracle.com wrote:
> > 2013/11/1 4:15 -0700, mandy.chung at oracle.com:
> >> http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8027351/webrev.00/
> > Looks good.
> > Just one question: In Finalizer.java, at line 97 you look up the
> > JavaLangAccess object every single time. Is it worth caching that
> > earlier, maybe when the finalize thread starts, since it will never
> > change?
> I was expecting that would get optimized during runtime and it's a
> simple getter method. It's a good suggestion to cache it at the finalize
> thread start time and here is the revised webrev:
> Thanks for the review.
More information about the core-libs-dev