From 9a88c50ffb1233a95d89b83d01d6c9673c8641e7 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sun, 11 Aug 2013 21:04:55 +0200 Subject: [PATCH] [#1728] Recycle list after done with it in ReplayingDecoder/ByteToMessageDecoder channelInactive(..) --- .../main/java/io/netty/handler/codec/ByteToMessageDecoder.java | 1 + codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java | 1 + 2 files changed, 2 insertions(+) diff --git a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java index 0968c33549..5ce3350871 100644 --- a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java +++ b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java @@ -212,6 +212,7 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter ctx.fireChannelRead(out.get(i)); } ctx.fireChannelInactive(); + out.recycle(); } } diff --git a/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java b/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java index 74248d1202..4f8e90a24c 100644 --- a/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java +++ b/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java @@ -345,6 +345,7 @@ public abstract class ReplayingDecoder extends ByteToMessageDecoder { ctx.fireChannelRead(out.get(i)); } ctx.fireChannelInactive(); + out.recycle(); } }