On Mon, 30 Mar 2026 16:58:28 GMT, Ruby Chen <[email protected]> wrote:

> When comparing a `MemorySegment` to `MemorySegment.NULL` using `==`, the 
> comparison may fail because a segment with address `0` can be created 
> independently and will therefore have a different identity from 
> `MemorySegment.NULL`. 
> 
> This PR adds JavaDocs that explain this issue and warn against using `==` to 
> compare segments to `MemorySegment.NULL`.

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/30501

Reply via email to