Fix a memory leak in AbstractCompositeByteBufTest
This commit is contained in:
parent
b271774c90
commit
94a9096be5
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user