Update APIs with the latest project-panama changes
This commit is contained in:
parent
9c87dc8208
commit
b396252682
@ -60,7 +60,7 @@ public class NativeMemorySegmentManager extends AbstractMemorySegmentManager {
|
||||
@Override
|
||||
protected MemorySegment createSegment(long size, Cleaner cleaner) {
|
||||
final ResourceScope scope = cleaner == null ? newSharedScope() : newSharedScope(cleaner);
|
||||
scope.addOnClose(getCleanupAction(size));
|
||||
scope.addCloseAction(getCleanupAction(size));
|
||||
var segment = MemorySegment.allocateNative(size, scope);
|
||||
MEM_USAGE_NATIVE.add(size);
|
||||
return segment;
|
||||
|
Loading…
x
Reference in New Issue
Block a user