You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by we...@apache.org on 2021/12/15 10:24:03 UTC

[rocketmq-client-go] branch master updated: [ISSUE #752] change argument to pointer-like to avoid allocations

This is an automated email from the ASF dual-hosted git repository.

wenfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 82dcf51  [ISSUE #752] change argument to pointer-like to avoid allocations
82dcf51 is described below

commit 82dcf51c7c9bcec25a29e9617da61089db44b16d
Author: xuweiwei <vi...@163.com>
AuthorDate: Wed Dec 15 18:23:58 2021 +0800

    [ISSUE #752] change argument to pointer-like to avoid allocations
    
    Signed-off-by: xuweiwei <xu...@cmss.chinamobile.com>
---
 primitive/pool.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/primitive/pool.go b/primitive/pool.go
index 946c18e..03d4a17 100644
--- a/primitive/pool.go
+++ b/primitive/pool.go
@@ -41,7 +41,7 @@ func GetHeader() []byte {
 }
 
 func BackHeader(d []byte) {
-	headerPool.Put(d)
+	headerPool.Put(&d)
 }
 
 func GetBuffer() *bytes.Buffer {