MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Free

Method Free

xmlparser/buffer.go:22–30  ·  view source on GitHub ↗

Free truncates the buffer and returns it to the pool.

()

Source from the content-addressed store, hash-verified

20
21// Free truncates the buffer and returns it to the pool.
22func (b *buffer) Free() {
23 // Don't keep large buffers around.
24 if len(*b) > 16*1024 {
25 return
26 }
27
28 b.Reset()
29 bufPool.Put(b)
30}
31
32// Reset truncates the buffer.
33func (b *buffer) Reset() {

Callers 1

CloseMethod · 0.80

Calls 1

ResetMethod · 0.95

Tested by

no test coverage detected