Merge pull request #50 from netty/panama-update

Update APIs with the latest project-panama changes
This commit is contained in:
Chris Vest 2021-04-26 18:33:14 +02:00 committed by GitHub
commit b541a20b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;