I assumed, I understood how Bytebuffer and DirectByteBuffer differs until i read a artical on IBM documentation, metioning :
"Direct ByteBuffer objects clean up their native buffers automatically but can only do so as part of Java heap GC"
https://www.ibm.com/developerworks/library/j-nativememory-linux/
Now I am not able to understand this line, as it says DirectByteBuffer does cleaning as part of Java heap GC.
IFAIK, Java Heap GC only do clean up in java heap(where DirectByteBuffer is not allocated). It(GC) is no aware of native memory(where DirectByteBuffer is allocated).
Please help me understand this line, or if there is gap in my understanding