summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-07 16:00:51 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-07 16:00:51 +0200
commite62f6ba8ec1c83196f78044b5dd905eeb80d4707 (patch)
tree3b8de1018d2ccf6cc4d76541bcc1881f58b84ca2 /common/storage_lmdb.cpp
parent8a78dbe0612fda7cd66b43057f6d467d3e1844dd (diff)
downloadsink-e62f6ba8ec1c83196f78044b5dd905eeb80d4707.tar.gz
sink-e62f6ba8ec1c83196f78044b5dd905eeb80d4707.zip
Replaced commented code with a comment.
Diffstat (limited to 'common/storage_lmdb.cpp')
-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))