Are you using sync.Pool, and where?

Hi all,

I have never used sync.Pool in production. Is this a commonly used data structure, and where ?

This is a widely used datastructure. For example fmt uses it to cache string buffers, net/http uses it to cache buffers too, etc.

In my experience it is easy to bloat memory usage with sync.Pool so be careful with it!

Usually used for object reuse to reduce GC triggered by repeated memory allocation.

example: echo.Context

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.