mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
Remove redundant copyBufferPool from relay
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
package relay
|
||||
|
||||
import "sync"
|
||||
|
||||
var copyBufferPool = sync.Pool{
|
||||
New: func() any {
|
||||
rv := make([]byte, copyBufferSize)
|
||||
|
||||
return &rv
|
||||
},
|
||||
}
|
||||
|
||||
func acquireCopyBuffer() *[]byte {
|
||||
return copyBufferPool.Get().(*[]byte) //nolint: forcetypeassert
|
||||
}
|
||||
|
||||
func releaseCopyBuffer(buf *[]byte) {
|
||||
copyBufferPool.Put(buf)
|
||||
}
|
||||
Reference in New Issue
Block a user