Merge pull request #40 from fish2000/patch-2
Allow `rocksdb.DB` instances to be manually closed (second revision PR)
This commit is contained in:
commit
ee1bc5a0b9
1 changed files with 3 additions and 0 deletions
|
@ -1671,6 +1671,9 @@ cdef class DB(object):
|
|||
self.opts.in_use = True
|
||||
|
||||
def __dealloc__(self):
|
||||
self.close()
|
||||
|
||||
def close(self):
|
||||
cdef ColumnFamilyOptions copts
|
||||
if not self.db == NULL:
|
||||
# We have to make sure we delete the handles so rocksdb doesn't
|
||||
|
|
Loading…
Add table
Reference in a new issue