Created
September 10, 2014 09:06
-
-
Save normanmaurer/1a85423c3eab5e295c77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void testRefCnt() { | |
| CompositeByteBuf comp = compositeBuffer(); | |
| ByteBuf buf1 = directBuffer(2, 2); | |
| ByteBuf buf2 = directBuffer(2, 2); | |
| comp.addComponent(buf1); | |
| comp.addComponent(buf2); | |
| //comp.writeInt(1); | |
| //assertEquals(1, comp.getInt(0)); | |
| assertTrue(comp.release()); | |
| assertEquals(0, comp.refCnt()); | |
| assertEquals(0, buf1.refCnt()); | |
| assertEquals(0, buf2.refCnt()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment