Question about global SegmentScope

Glavo zjx001202 at gmail.com
Sun Apr 16 11:37:48 UTC 2023


SymbolLookup.libraryLookup takes a SegmentScope as a parameter, which
represents the lifecycle of the returned SymbolLookup.

It looks like you are using an old JDK? Panama has critical changes every
Java update, please use the latest JDK.

Glavo

On Sun, Apr 16, 2023 at 6:36 PM 刘希晨 <benrush0705 at gmail.com> wrote:

> Hi I have a question about global segment scope.
>
> If I use SymbolLookup.libraryLookup to load a C library and call its
> function which returns a pointer , in java it's represented by a memory
> segment, the memorysegment's scope would be global scope. Does this mean
> that the memory segment object wouldn't be released by anything until the
> VM exits?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230416/ac75d5c6/attachment-0001.htm>


More information about the panama-dev mailing list