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
|
@Test
|
||||||
public void testReadWithEmptyCompositeBuffer() {
|
public void testReadWithEmptyCompositeBuffer() {
|
||||||
ByteBuf buf = compositeBuffer();
|
ByteBuf buf = compositeBuffer();
|
||||||
|
try {
|
||||||
int n = 65;
|
int n = 65;
|
||||||
for (int i=0; i<n; ++i) {
|
for (int i=0; i<n; ++i) {
|
||||||
buf.writeByte(1);
|
buf.writeByte(1);
|
||||||
assertEquals(1, buf.readByte());
|
assertEquals(1, buf.readByte());
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
buf.release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user