Fix a memory leak in AbstractCompositeByteBufTest

This commit is contained in:
Trustin Lee 2013-03-12 17:57:23 +09:00
parent b271774c90
commit 94a9096be5

View File

@ -423,11 +423,14 @@ public abstract class AbstractCompositeByteBufTest extends
@Test
public void testReadWithEmptyCompositeBuffer() {
ByteBuf buf = compositeBuffer();
int n = 65;
for (int i=0; i<n; ++i) {
buf.writeByte(1);
assertEquals(1, buf.readByte());
try {
int n = 65;
for (int i=0; i<n; ++i) {
buf.writeByte(1);
assertEquals(1, buf.readByte());
}
} finally {
buf.release();
}
}
}