From 775eb9d43fd469a850ac445b0a434cbcc215ce3e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 24 Jun 2016 14:59:39 +0300 Subject: [PATCH] Update according to bytebufferpool new API --- bytebuffer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bytebuffer.go b/bytebuffer.go index 96e2b51..61dd9d8 100644 --- a/bytebuffer.go +++ b/bytebuffer.go @@ -44,7 +44,7 @@ func (b *ByteBuffer) Reset() { // This reduces the number of memory allocations required for byte buffer // management. func AcquireByteBuffer() *ByteBuffer { - return (*ByteBuffer)(bytebufferpool.Acquire()) + return (*ByteBuffer)(bytebufferpool.Get()) } // ReleaseByteBuffer returns byte buffer to the pool. @@ -52,7 +52,7 @@ func AcquireByteBuffer() *ByteBuffer { // ByteBuffer.B mustn't be touched after returning it to the pool. // Otherwise data races occur. func ReleaseByteBuffer(b *ByteBuffer) { - bytebufferpool.Release(bb(b)) + bytebufferpool.Put(bb(b)) } func bb(b *ByteBuffer) *bytebufferpool.ByteBuffer {