使用 UnpooledByteBufAllocator 时 buf 泄漏是否正常
Is buf leaks ok while using `UnpooledByteBufAllocator`
我正在使用 netty 4.1 的 UnpooledByteBufAllocator
并且有一些由它创建的 buf
不会被发布。
这会很危险吗?
理论上是的,因为 GC 会在某个时候注意收集内存。也就是说,没有任何泄漏肯定更好、更安全。一旦您决定要使用 PooledByteBufAllocator
.
,这也会对您有所帮助
我正在使用 netty 4.1 的 UnpooledByteBufAllocator
并且有一些由它创建的 buf
不会被发布。
这会很危险吗?
理论上是的,因为 GC 会在某个时候注意收集内存。也就是说,没有任何泄漏肯定更好、更安全。一旦您决定要使用 PooledByteBufAllocator
.