[foreign-memaccess+abi] RFR: Investigate alternate strategy to acquire resource scopes [v2]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Apr 20 16:31:19 UTC 2021
On Tue, 20 Apr 2021 15:45:54 GMT, Chris Hegarty <chegar at openjdk.org> wrote:
> There is one small wart that we can probably live it, but I'd like to ensure that we're comfortable with it - Handle::close returning the global scope for "The implicit resource scope handle" (I like this term). It seems odd at first that the scope method would not return the actual implicit scope, but I understand the reasoning for it - and I accept that the handle is kinda logically meaningless, but exists to help promote good usage patterns.
Yep - that is the compromise - if we're not comfortable we can remove the accessor - but then it become harder to explain why some calls to ResourceScope::release fail.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/511
More information about the panama-dev
mailing list