RFR: 8325858: Replace Unsafe usage in XEmbeddingContainer with FFM API [v3]

Phil Race prr at openjdk.org
Thu Feb 22 19:38:53 UTC 2024


On Thu, 22 Feb 2024 16:28:40 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> src/java.desktop/unix/classes/sun/awt/X11/XEmbeddingContainer.java line 150:
>> 
>>> 148:                 }
>>> 149:             } finally {
>>> 150:                 Reference.reachabilityFence(data);
>> 
>> Can you explain the need for this `reachabilityFence()`? I don't understand how `data` could become unreachable before the `Arena` is closed. Also, it's an in-scope local variable. Thanks!
>
> You are right. As we have the arena,  we do not need to invoke the reachabilityFence.

Yes, I had asked the same question !

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17846#discussion_r1499823969


More information about the client-libs-dev mailing list