Correctly release message in MemcacheClientHandler that is used in the memcache example. (#8119)
Motivation: MemcacheClientHandler.channelRead(...) need to release the frame after it prints out its content to not introduce a memory leak. Modifications: Call release() on the frame. Result: Example has no leak any more.
This commit is contained in:
parent
7bb9e7eafe
commit
4b9125f961
@ -69,6 +69,7 @@ public class MemcacheClientHandler extends ChannelDuplexHandler {
|
||||
public void channelRead(ChannelHandlerContext ctx, Object msg) {
|
||||
FullBinaryMemcacheResponse res = (FullBinaryMemcacheResponse) msg;
|
||||
System.out.println(res.content().toString(CharsetUtil.UTF_8));
|
||||
res.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user