RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)
Peter Levart
peter.levart at gmail.com
Sun May 3 07:28:25 UTC 2020
On 5/1/20 4:36 PM, Maurizio Cimadamore wrote:
>
> Now there's dup(). I think implementing dup() on a root scope is not
> too hard - for the child you probably need some trick, but probably
> not too bad - in the sense that in a Child scope, the cleanup action
> is really the increment of the root exit scope. So you could have a:
>
> close(boolean doCleanup)
>
> like we do now, and avoid the cleanup on dup (which in the case of the
> Child will avoid the adder increment). I *believe* this should be
> functionally equivalent to what we have now.
>
I optimized the dup() on both root and child scopes as much as possible
in last version of MemoryScope. I also added some comments about usage
of methods. I'll make a PR for this version incorporated in the panama
shortly:
http://cr.openjdk.java.net/~plevart/jdk-dev/8243491_MemoryScope/v3/MemoryScope.java
Regards, Peter
More information about the core-libs-dev
mailing list