netty
中有堆外内存,需要手动释放。
UnpooledHeapByteBuf
- 使用
JVM
内存,等待GC
回收即可
- 使用
UnpooledDirectByteBuf
- 使用直接内存,需要特殊方法回收
PooledByteBuf和子类
- 使用了池化机制,需要更复杂的规则回收 「重用」
netty
中有堆外内存,需要手动释放。
UnpooledHeapByteBuf
JVM
内存,等待 GC
回收即可UnpooledDirectByteBuf
PooledByteBuf和子类
bytebuf
的调试方法。
bytebuf
的结构。
八字纳音。
bytebuf
是可以扩容的。