1
0
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:
andig 2019-09-09 20:14:07 +02:00
parent 28f8f55bd2
commit d9df74a4ae

View File

@ -164,7 +164,6 @@ func Marshal(v interface{}) ([]byte, error) {
}
buf := append([]byte(nil), e.Bytes()...)
e.Reset()
encodeStatePool.Put(e)
return buf, nil