MCPcopy
hub / github.com/gofiber/fiber / releasePooledBinder

Function releasePooledBinder

bind.go:125–128  ·  view source on GitHub ↗

releasePooledBinder resets a binder and returns it to its pool. It should be used with defer to ensure proper cleanup of pooled binders.

(pool *sync.Pool, bind T)

Source from the content-addressed store, hash-verified

123// releasePooledBinder resets a binder and returns it to its pool.
124// It should be used with defer to ensure proper cleanup of pooled binders.
125func releasePooledBinder[T interface{ Reset() }](pool *sync.Pool, bind T) {
126 bind.Reset()
127 binder.PutToThePool(pool, bind)
128}
129
130func (b *Bind) release() {
131 b.ctx = nil

Callers 10

HeaderMethod · 0.85
RespHeaderMethod · 0.85
CookieMethod · 0.85
QueryMethod · 0.85
JSONMethod · 0.85
CBORMethod · 0.85
XMLMethod · 0.85
FormMethod · 0.85
URIMethod · 0.85
MsgPackMethod · 0.85

Calls 2

PutToThePoolFunction · 0.92
ResetMethod · 0.65

Tested by

no test coverage detected