diff --git a/rocksdb/_rocksdb.pyx b/rocksdb/_rocksdb.pyx index edd856a..5a2d0c9 100644 --- a/rocksdb/_rocksdb.pyx +++ b/rocksdb/_rocksdb.pyx @@ -1672,17 +1672,17 @@ cdef class DB(object): 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 # assert when we delete the db - self.cf_handles.clear() + del self.cf_handles[:] for copts in self.cf_options: if copts: copts.in_use = False - self.cf_options.clear() + del self.cf_options[:] with nogil: del self.db