Commit 89e92ad3 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

More fiddling around with c++. Addresses #197.

git-svn-id: file:///svn/tokudb@1179 c7de825b-a66e-492c-adef-691d508d4ae1
parent 60d70631
...@@ -2,20 +2,21 @@ ...@@ -2,20 +2,21 @@
Db::~Db() { Db::~Db() {
if (!the_db) { if (!the_db) {
the_db->close(db, 0); close(0); // the user should have called close, but we do it here if not done.
the_db->toku_internal = 0;
// Do we need to clean up "private environments"?
} }
} }
int DB::close (u_int32_t flags) { int Db::close (u_int32_t flags) {
if (!the_db) { if (!the_db) {
return EINVAL; return EINVAL;
} }
the_db->toku_internal = 0;
int ret = the_db->close(flags); int ret = the_db->close(flags);
the_db->toku_internal = 0; the_db = 0;
// Do we need to clean up "private environments"? // Do we need to clean up "private environments"?
// What about cursors? They should be cleaned up already.
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment