From b271774c905c4e63146203734ca62984fb84f308 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 12 Mar 2013 16:49:14 +0900 Subject: [PATCH] Fix memory leak in UnpooledTest - nothing critical. It's a test that leaks. Not CompositeByteBuf implementation. --- buffer/src/test/java/io/netty/buffer/UnpooledTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buffer/src/test/java/io/netty/buffer/UnpooledTest.java b/buffer/src/test/java/io/netty/buffer/UnpooledTest.java index add4f1d945..06798db7ab 100644 --- a/buffer/src/test/java/io/netty/buffer/UnpooledTest.java +++ b/buffer/src/test/java/io/netty/buffer/UnpooledTest.java @@ -207,7 +207,11 @@ public class UnpooledTest { EMPTY_BUFFER, wrappedBuffer(new byte[16]).order(LITTLE_ENDIAN), EMPTY_BUFFER); - assertEquals(16, buf.capacity()); + try { + assertEquals(16, buf.capacity()); + } finally { + buf.release(); + } } @Test