RFR: 6543126: Level.known can leak memory
chris.hegarty at oracle.com
Wed Jul 27 10:17:23 UTC 2016
On 25/07/16 19:10, Daniel Fuchs wrote:
> Please find below a fix for:
> 6543126: Level.known can leak memory
Since mirroredLevel is a strong reference to the same given Level,
in the case where the level's class is the JDK's Level.class, then
you do not need either of the reachabilityFence's.
With this change there is a race between checking the weak reference
and accessing the mirroredLevel, this is evident in findLevel(String).
I think this is benign, the code is racy, but not susceptible to any
issues resulting from this.
Otherwise, the changes look good to me.
More information about the core-libs-dev