netty-incubator-buffer-api/src/test/java
Chris Vest 987a398700 Fix native memory leak bug
Motivation:
The untethered memory allocated by ensureWritable in a direct MemorySegment based non-pooled Buffer would be allocated without having a Cleaner attached to its ResourceScope.
This could cause that memory to leak if the Buffer instance was cast aside.

Modification:
ManagedBufferAllocator now makes sure to attach a cleaner to the buffer and its memory segment, when allocating untethered memory.

Result:
The BufferTest$CleanerTests now pass.
2021-04-07 17:17:35 +02:00
..
io/netty/buffer/api Fix native memory leak bug 2021-04-07 17:17:35 +02:00