> On Mar 13, 2019, at 6:19 PM, Hans Boehm <hbo...@google.com> wrote: > > Looks great to me!
Thanks. > Just to be clear, this is intended to guarantee that it's not possible to > promote a weak global reference that indirectly points to A after a > PhantomReference or a WeakGlobalReference to A has been cleared? Thus this > reference clearing must happen more or less atomically. Yes. That’s the point of saying the jweak becomes functionally equivalent to NULL at the same time as a PhantomReference for the same object would be cleared. > I think this property has always been needed for the intended use of > PhantomReferences, since otherwise the referent of a cleared PhantomReference > could be resurrected. It's great to get it in the spec. Exactly. That’s the “important safety invariant” mentioned in the CSR.