From e62f6ba8ec1c83196f78044b5dd905eeb80d4707 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 7 Oct 2016 16:00:51 +0200 Subject: Replaced commented code with a comment. --- common/storage_lmdb.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'common') 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 Storage::Private::~Private() { - // Since we can have only one environment open per process, we currently leak the environments. - // if (env) { - // //mdb_dbi_close should not be necessary and is potentially dangerous (see docs) - // mdb_dbi_close(env, dbi); - // mdb_env_close(env); - // } + //We never close the environment (unless we remove the db), since we should only open the environment once per process (as per lmdb docs) + //and create storage instance from all over the place. Thus, we're not closing it here on purpose. } Storage::Storage(const QString &storageRoot, const QString &name, AccessMode mode) : d(new Private(storageRoot, name, mode)) -- cgit v1.2.3