简体   繁体   中英

I wonder if netty's directBytebuf will be automatically recycled

The Java nio DirectByteBuffer will be managed by the JVM and the gc will recycle the memory out of the heap. I wonder if.netty's directBytebuf will be automatically recycled or if it must be manually released

When accessing things like PooledDirectByteBuf , it's usually the responsibility of the last accessor to release. ByteBuf in Netty is reference counted, and thus the active number of references needs to be updated correctly, to make something eligible for deallocation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM