Skip to content

Commit 3b50b26

Browse files
committed
remove destructor, close environment only once
1 parent 1fa95ec commit 3b50b26

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/collection/backend/lmdb.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ namespace backend {
4040
LMDB::LMDB(std::string name) :
4141
Collection(name), m_env(NULL), isOpen(false) {}
4242

43-
44-
LMDB::~LMDB() {
45-
mdb_env_close(m_env);
46-
}
47-
4843
int LMDB::txn_begin(unsigned int flags, MDB_txn **ret) {
4944
if (!isOpen) {
5045
MDBEnvProvider* provider = MDBEnvProvider::GetInstance();

src/collection/backend/lmdb.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ class LMDB :
9999
public Collection {
100100
public:
101101
explicit LMDB(std::string name);
102-
~LMDB();
103102
void store(std::string key, std::string value) override;
104103

105104
bool storeOrUpdateFirst(const std::string &key,

0 commit comments

Comments
 (0)