在 ReplayingDecoder 中释放 ByteBuf

Releasing ByteBuf in ReplayingDecoder

什么情况下Netty中传给decode() method of ReplayingDecoder的'in'ByteBuf需要显式释放4.x?

为了缩短它永远不会...如果需要,ReplayingDecoder 会负责释放 in。也就是说,如果您在 decode 方法中创建一个新缓冲区,您有责任将其放入 out 或释放它。