mirror of
https://github.com/golang/go
synced 2024-11-18 16:14:46 -07:00
Reset when retrieving from pool only
This commit is contained in:
parent
28f8f55bd2
commit
d9df74a4ae
@ -164,7 +164,6 @@ func Marshal(v interface{}) ([]byte, error) {
|
||||
}
|
||||
buf := append([]byte(nil), e.Bytes()...)
|
||||
|
||||
e.Reset()
|
||||
encodeStatePool.Put(e)
|
||||
|
||||
return buf, nil
|
||||
|
Loading…
Reference in New Issue
Block a user