[foreign-preview] RFR: 8281334: MemorySegment.ofBuffer does not keep byte buffer alive

Paul Sandoz psandoz at openjdk.java.net
Mon Feb 7 18:10:24 UTC 2022


On Mon, 7 Feb 2022 13:09:16 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This patch tweaks AbstractMemorySegmentImpl::ofBuffer to create an heap scope which keeps the input ByteBuffer alive, in case the returned segment has to be associated with a global scope.

Marked as reviewed by psandoz (Committer).

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

PR: https://git.openjdk.java.net/panama-foreign/pull/639


More information about the panama-dev mailing list