On Mon, 9 Sep 2024 16:25:15 GMT, Stuart Marks <sma...@openjdk.org> wrote:
>> @dholmes-ora Is this really possible? The `obj` ref is passed to the >> PhantomReference constructor, which stores it in a field, the constructed >> PhantomReference is returned, and it's then used in a reachabilityFence call >> below. So `obj` should remain reachable the entire time, right? > > (As an aside, I wasn't able to determine what any of the Reference classes do > if they're created with a null reference. Possibly a spec bug?) I also agree with @stuart-marks that the moved to near the ned RF for `ref` is sufficient. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20898#discussion_r1751251574