Open Jay-deng opened 1 year ago
When I use Uber's goleak to run the test function TestWriteAndGetOnCache() in https://github.com/allegro/bigcache/blob/master/bigcache_test.go, I got the following output information. I was wondering if it is a bug ?
You can reproduce it like this:
Nice catch. Probably we should call defer cache.Close() after cache is created to prevent such leak. https://github.com/allegro/bigcache/blob/982ec3b09cacb9936b88dcfdaed329870065cf23/bigcache.go#L122-L125
defer cache.Close()
When I use Uber's goleak to run the test function TestWriteAndGetOnCache() in https://github.com/allegro/bigcache/blob/master/bigcache_test.go, I got the following output information. I was wondering if it is a bug ?
You can reproduce it like this: