8309042: MemorySegment::reinterpret cleanup action is not called for all overloads

Reviewed-by: jvernee
This commit is contained in:
Maurizio Cimadamore 2023-05-30 10:24:10 +00:00
parent 78aac241b8
commit 2b186e246e
2 changed files with 16 additions and 1 deletions

View file

@ -125,7 +125,7 @@ public abstract sealed class AbstractMemorySegmentImpl
public final MemorySegment reinterpret(long newSize, Arena arena, Consumer<MemorySegment> cleanup) {
Objects.requireNonNull(arena);
return reinterpretInternal(Reflection.getCallerClass(), newSize,
MemorySessionImpl.toMemorySession(arena), null);
MemorySessionImpl.toMemorySession(arena), cleanup);
}
@Override