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

Method free

logger/buffer.go:38–46  ·  view source on GitHub ↗

free truncates the buffer and returns it to the pool.

()

Source from the content-addressed store, hash-verified

36
37// free truncates the buffer and returns it to the pool.
38func (b *buffer) free() {
39 // Don't keep large buffers around.
40 if len(*b) > 16*1024 {
41 return
42 }
43
44 *b = (*b)[:0]
45 bufPool.Put(b)
46}
47
48// len returns the number of bytes written to the buffer.
49func (b *buffer) len() int {

Callers 7

vipsErrorFunction · 0.80
appendJSONMarshalMethod · 0.80
HandleMethod · 0.80
writeErrorMethod · 0.80
formatMethod · 0.80
calcDct2HashMethod · 0.80
calcSha256HashMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected