On Fri, 14 Jan 2022 22:26:31 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

> > One additional improvement would be to change r.get() == null to 
> > r.refersTo(null) to check for cleared reference, that avoids reviving the 
> > referent, e.g. in SATB GCs. I leave that up to you.
> 
> I think that does not work, because we want to strongly reference the `val` 
> for eventual return.

Ah right. Looks ok then!

-------------

PR: https://git.openjdk.java.net/jdk/pull/7092

Reply via email to