Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save devzendo/6062279 to your computer and use it in GitHub Desktop.
Save devzendo/6062279 to your computer and use it in GitHub Desktop.
Netty test
@Test
public void test() {
NarSystem.loadLibrary();
UnpooledNativeByteBufAllocator allocator = UnpooledNativeByteBufAllocator.DEFAULT;
ByteBuf buf = allocator.directBuffer();
Assert.assertTrue(buf.isDirect());
buf.release();
Assert.assertEquals(0, buf.refCnt());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment