netty-incubator-buffer-api/src/main/java/io/netty/buffer/api
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
..
adaptor Fix failing ByteBufAdaptorTests and increase adaptor compatibility 2021-03-16 12:11:29 +01:00
bytebuffer Update code to support bleeding edge MemorySegment APIs after the latest refactoring 2021-04-07 14:28:05 +02:00
internal Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
memseg Fix native memory leak bug 2021-04-07 17:17:35 +02:00
AllocatorControl.java Rename Buf to Buffer and Allocator to BufferAllocator 2021-02-12 18:22:07 +01:00
Buffer.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
BufferAccessors.java Rename Buf to Buffer and Allocator to BufferAllocator 2021-02-12 18:22:07 +01:00
BufferAllocator.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
BufferHolder.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
BufferRef.java Rename Buf to Buffer and Allocator to BufferAllocator 2021-02-12 18:22:07 +01:00
ByteCursor.java Update ByteCursor method names and related javadocs 2020-12-09 11:03:30 +01:00
CleanerPooledDrop.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
CompositeBuffer.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
Deref.java Introduce Deref abstraction 2021-02-11 14:26:57 +01:00
Drop.java Address review comments on bifurcate PR 2020-12-10 12:51:18 +01:00
LifecycleTracer.java Make LifecycleTracer thread-safe 2021-03-09 11:57:49 +01:00
ManagedBufferAllocator.java Fix native memory leak bug 2021-04-07 17:17:35 +02:00
MemoryManager.java Update code to support bleeding edge MemorySegment APIs after the latest refactoring 2021-04-07 14:28:05 +02:00
MemoryManagers.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
MemoryManagersOverride.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
Owned.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
package-info.java Rename Buf to Buffer and Allocator to BufferAllocator 2021-02-12 18:22:07 +01:00
Rc.java Make the incubating buffers exposable as ByteBuf 2021-03-01 10:49:09 +01:00
RcSupport.java Fix failing ByteBufAdaptorTests and increase adaptor compatibility 2021-03-16 12:11:29 +01:00
ReadableComponent.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
ReadableComponentProcessor.java Explode ComponentProcessor into its contained interfaces 2021-02-12 18:28:29 +01:00
ResourceDisposeFailedException.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
Scope.java Add BufHolder and BufRef helper classes 2020-12-14 14:22:37 +01:00
Send.java Introduce Deref abstraction 2021-02-11 14:26:57 +01:00
SizeClassedMemoryPool.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
TransferSend.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
WritableComponent.java Add a ByteBuffer based implementation of Buffer 2021-03-18 15:18:22 +01:00
WritableComponentProcessor.java Explode ComponentProcessor into its contained interfaces 2021-02-12 18:28:29 +01:00