This DirectMemory should be released
I faced the huge direct memory usage in my application (using Netty). I research it and found this ReadOnlyByteBufferBuf copy method.


https://github.com/netty/netty/blob/eb7f751ba519cbcab47d640cd18757f09d077b55/buffer/src/main/java/io/netty/buffer/ReadOnlyByteBufferBuf.java#L419


It seams to create DirectByteBuffer and put it to UnpooledDirectByteBuf constructor. In this constructor, 'doNotFree field' will set to true. Then this DirectByteBuffer seams be not freed (by code. But GC will free this memory).


I hope Netty free this memory.