StorageCache dtor leaks
Former-commit-id: 0262c4dc76a320141b8a4454df2f6baab4f74ab3
This commit is contained in:
parent
4000334b1f
commit
614860ce3c
@ -25,6 +25,12 @@ StorageCache::StorageCache(IStorage *storage, bool fCache)
|
||||
m_pdict = dictCreate(&dbStorageCacheType, nullptr);
|
||||
}
|
||||
|
||||
StorageCache::~StorageCache()
|
||||
{
|
||||
if (m_pdict != nullptr)
|
||||
dictRelease(m_pdict);
|
||||
}
|
||||
|
||||
void StorageCache::clear()
|
||||
{
|
||||
std::unique_lock<fastlock> ul(m_lock);
|
||||
|
@ -29,6 +29,8 @@ class StorageCache
|
||||
}
|
||||
|
||||
public:
|
||||
~StorageCache();
|
||||
|
||||
static StorageCache *create(IStorageFactory *pfactory, int db, IStorageFactory::key_load_iterator fn, void *privdata) {
|
||||
StorageCache *cache = new StorageCache(nullptr, pfactory->FSlow() /*fCache*/);
|
||||
load_iter_data data = {cache, fn, privdata};
|
||||
|
Loading…
x
Reference in New Issue
Block a user