netty-incubator-buffer-api/buffer/src
Chris Vest 1f4e33b42a Add a BBuf allocator for direct memory, that is also managed by a Cleaner
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.
2020-11-17 15:26:57 +01:00
..
main/java/io/netty/buffer/b2 Add a BBuf allocator for direct memory, that is also managed by a Cleaner 2020-11-17 15:26:57 +01:00
test/java/io/netty/buffer/b2 Add a BBuf allocator for direct memory, that is also managed by a Cleaner 2020-11-17 15:26:57 +01:00