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

Method Close

client/response.go:208–215  ·  view source on GitHub ↗

Close releases both the Request and Response objects back to their pools. After calling Close, do not use these objects.

()

Source from the content-addressed store, hash-verified

206// Close releases both the Request and Response objects back to their pools.
207// After calling Close, do not use these objects.
208func (r *Response) Close() {
209 if r.request != nil {
210 tmp := r.request
211 r.request = nil
212 ReleaseRequest(tmp)
213 }
214 ReleaseResponse(r)
215}
216
217var responsePool = &sync.Pool{
218 New: func() any {

Callers 2

Benchmark_Client_RequestFunction · 0.95

Calls 2

ReleaseRequestFunction · 0.85
ReleaseResponseFunction · 0.85

Tested by 2

Benchmark_Client_RequestFunction · 0.76