diff --git a/util/cache.cc b/util/cache.cc index 79e5cc9bd..247f3c357 100644 --- a/util/cache.cc +++ b/util/cache.cc @@ -304,7 +304,9 @@ class ShardedLRUCache : public Cache { : last_id_(0) { init(capacity, numShardBits); } - virtual ~ShardedLRUCache() { } + virtual ~ShardedLRUCache() { + delete[] shard_; + } virtual Handle* Insert(const Slice& key, void* value, size_t charge, void (*deleter)(const Slice& key, void* value)) { const uint32_t hash = HashSlice(key);