1f4e33b42a
Motivation: Client code sometimes struggle with managing their buffer reference counts correctly, so there's a use case for buffers that are deallocated by cleaners. Modification: Add another allocator, directWithCleaner, which registers all the native memory segments with cleaners. Result: It's possible to get unpooled direct buffers, that are automatically deallocated by a cleaner if they are no longer strongly referenced. The same is not necessary for heap buffers, since they can be garbage collected like normal objects. |
||
---|---|---|
.. | ||
main/java/io/netty/buffer/b2 | ||
test/java/io/netty/buffer/b2 |