[foreign-memaccess+abi] RFR: 8263018: Improve API for lifecycle of native resources [v15]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Mar 19 17:45:09 UTC 2021


On Fri, 19 Mar 2021 15:54:18 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add ResourceScope overloads in CLinker
>>   Rewrite StdLib test not to use NativeScope
>>   Tweak names of allocator factories
>>   Fix javadoc
>
> This is looking very good.

Addressed latest comments. I also added two new static methods, one to obtain a new "default scope" (that is, the implicit scope that is created when you call e.g. MemorySegment::allocateNative), and also the "default allocator" - e.g. an allocator that returns segments based on their own default scopes.

javadoc here:
http://cr.openjdk.java.net/~mcimadamore/panama/resourceScope-javadoc_v7/javadoc/jdk/incubator/foreign/package-summary.html

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

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


More information about the panama-dev mailing list