void TestCompositeHeapBufferWithCapacity(bool preferDirect, int maxNumComponents) { IByteBufferAllocator allocator = this.NewAllocator(preferDirect); CompositeByteBuffer buffer = allocator.CompositeHeapBuffer(maxNumComponents); try { this.AssertCompositeByteBuffer(buffer, maxNumComponents); } finally { buffer.Release(); } }
public void CompositeHeapBufferWithCapacity() { IByteBufferAllocator allocator = this.NewAllocator(); CompositeByteBuffer buffer = allocator.CompositeHeapBuffer(8); try { this.AssertCompositeByteBuffer(buffer, 8); } finally { buffer.Release(); } }
public void CompositeHeapBuffer(bool preferDirect) { IByteBufferAllocator allocator = this.NewAllocator(preferDirect); CompositeByteBuffer buffer = allocator.CompositeHeapBuffer(); try { this.AssertCompositeByteBuffer(buffer, this.DefaultMaxComponents); } finally { buffer.Release(); } }
public CompositeByteBuffer CompositeBuffer() => _allocator.CompositeHeapBuffer();