mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 08:21:56 +03:00
Reset bytes buffer before returning back to a pool
This commit is contained in:
@@ -30,6 +30,7 @@ func acquireCloakBuffer() *[]byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func releaseBytesBuffer(buf *bytes.Buffer) {
|
func releaseBytesBuffer(buf *bytes.Buffer) {
|
||||||
|
buf.Reset()
|
||||||
poolBytesBuffer.Put(buf)
|
poolBytesBuffer.Put(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user