MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / Get

Function Get

pool.go:42–42  ·  view source on GitHub ↗

Get returns an empty byte buffer from the pool. Got byte buffer may be returned to the pool via Put call. This reduces the number of memory allocations required for byte buffer management.

()

Source from the content-addressed store, hash-verified

40// This reduces the number of memory allocations required for byte buffer
41// management.
42func Get() *ByteBuffer { return defaultPool.Get() }
43
44// Get returns new byte buffer with zero length.
45//

Callers 3

testByteBufferGetPutFunction · 0.85
testByteBufferGetStringFunction · 0.85
testGetPutFunction · 0.85

Calls 1

GetMethod · 0.80

Tested by 3

testByteBufferGetPutFunction · 0.68
testByteBufferGetStringFunction · 0.68
testGetPutFunction · 0.68