Say, we declare in MyClass:
ByteBuf fixedBuf = Unpooled.unreleasableBuffer(
PooledByteBufAllocator.DEFAULT.directBuffer(64, 64));
This should reserve a 64 bytes chunk of off-heap memory. As documented, Netty ignores here the 'release()' and 'retain()' functionality, therefore, the chunk remains allocated throughout the life of MyClass. What will happen to the allocated off-heap memory chunk once the instance of MyClass gets out of scope? Will JVM/GC release it? If not, or if I want to discard the 'fixedBuf ' programatically, how can I best deallocate the claimed memory blocks for such ByteBuf objects?
Would you please also point to explanation(s) / example(s) / best practice for avoiding any memory leaks and issues on ByteBuf objects?