summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/storage_lmdb.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 844bbfb..6f11af3 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -641,12 +641,8 @@ Storage::Private::Private(const QString &s, const QString &n, AccessMode m) : st
641 641
642Storage::Private::~Private() 642Storage::Private::~Private()
643{ 643{
644 // Since we can have only one environment open per process, we currently leak the environments. 644 //We never close the environment (unless we remove the db), since we should only open the environment once per process (as per lmdb docs)
645 // if (env) { 645 //and create storage instance from all over the place. Thus, we're not closing it here on purpose.
646 // //mdb_dbi_close should not be necessary and is potentially dangerous (see docs)
647 // mdb_dbi_close(env, dbi);
648 // mdb_env_close(env);
649 // }
650} 646}
651 647
652Storage::Storage(const QString &storageRoot, const QString &name, AccessMode mode) : d(new Private(storageRoot, name, mode)) 648Storage::Storage(const QString &storageRoot, const QString &name, AccessMode mode) : d(new Private(storageRoot, name, mode))