(SCC-SA6002) Storing non-pointer values in `sync.Pool` allocates memory
johnsonjh opened this issue · comments
Jeffrey H. Johnson commented
Description
A sync.Pool is used to avoid unnecessary allocations and reduce the amount of work the garbage collector has to do. When passing a value that is not a pointer to a function that accepts an interface, the value needs to be placed on the heap, which means an additional allocation. …
Occurrences
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/jleveldb/issue/SCC-SA6002/occurrences/
Repo Ranger commented