tally
tally copied to clipboard
Implementation of ObjectPool can lead to memory leaks
The ObjectPool implementation is used to cache string and array buffers. However, the underlying buffer is never truncated (the full capacity is kept) which means that they over time can built up.
I suggest either using https://golang.org/pkg/sync/#Pool that's GC aware (can be reclaimed by the GC when it sees fit) or explicitly dropping the buffer after X usages.
CC @jstroem
A similar issue; buffered scopes will never be pruned so if you use different tags for every call the number of buffered scopes will grow and never get droped.