MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / NewBufPool

Function NewBufPool

IceFireDB-SQLProxy/pkg/mysql/packet/conn.go:29–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func NewBufPool() *BufPool {
30 return &BufPool{
31 pool: &sync.Pool{
32 New: func() any {
33 return new(bytes.Buffer)
34 },
35 },
36 }
37}
38
39func (b *BufPool) Get() *bytes.Buffer {
40 return b.pool.Get().(*bytes.Buffer)

Callers 2

NewConnFunction · 0.70
NewTLSConnFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected