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. |
||
---|---|---|
.. | ||
adaptor | ||
benchmarks | ||
examples | ||
BufferRefTest.java | ||
BufferTest.java | ||
EchoIT.java | ||
Fixture.java | ||
Memoize.java | ||
ScopeTest.java |