Paul Sandoz paul.sandoz at
Tue Nov 24 09:32:12 UTC 2015

> On 24 Nov 2015, at 01:31, mark.reinhold at wrote:
> 2015/11/23 8:38 -0800, paul.sandoz at
>> Please review the addition of Reference.reachabilityFence contributed
>> by Aleksey, Doug and myself:
> This seems eminently reasonable, but why does it belong in the
> java.lang.ref.Reference class?  It has nothing (directly) to do
> with reference objects.
> java.lang.Runtime, perhaps?

Out of all the places i thought Reference was the least indirect. The method documentation refers to the notion of "strongly reachable” in the j.l.ref package doc (I should update to link directly to that). In effect it’s an operation on potential referents that relates to reachability, garbage collection and finalization.

A further weaker argument is Reference is not commonly used thus there may be less chance of this method being misused.

I do prefer the current location, but i don’t strongly object to moving it to Runtime.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the hotspot-compiler-dev mailing list