友电netty不用主动释放内存

This commit is contained in:
Guoqs
2024-12-29 17:24:19 +08:00
parent a4d553c6ef
commit 981b6f8872

View File

@@ -4,7 +4,6 @@ import com.jsowell.common.constant.Constants;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.util.ReferenceCountUtil;
import lombok.extern.slf4j.Slf4j;
import java.nio.charset.StandardCharsets;
@@ -136,9 +135,9 @@ public class YouDianProtocolDecoder extends ByteToMessageDecoder {
buffer.readerIndex(beginReader + HEADER_LENGTH_DNY + length + 2);
out.add(frame);
} finally {
if (frame != null) {
ReferenceCountUtil.release(frame);
}
// if (frame != null) {
// ReferenceCountUtil.release(frame);
// }
}
}