func (db *DB) Close() error { if db.db != nil { C.rocksdb_close(db.db) db.db = nil } if db.filter != nil { db.filter.Close() } if db.cache != nil { db.cache.Close() } if db.env != nil { db.env.Close() } //db.blockOpts.Close() db.opts.Close() db.readOpts.Close() db.writeOpts.Close() db.iteratorOpts.Close() return nil }
func (db *DB) Close() { if db.db != nil { C.rocksdb_close(db.db) db.db = nil if db.opt != nil { C.rocksdb_options_destroy(db.opt) } if db.rOpt != nil { C.rocksdb_readoptions_destroy(db.rOpt) } if db.wOpt != nil { C.rocksdb_writeoptions_destroy(db.wOpt) } if db.cache != nil { C.rocksdb_cache_destroy(db.cache) } if db.fp != nil { C.rocksdb_filterpolicy_destroy(db.fp) } } }
// Close closes the database. func (self *DB) Close() { C.rocksdb_close(self.c) }
// close closes the database by deallocating the underlying handle. func (r *RocksDB) close() { C.rocksdb_close(r.rdb) r.rdb = nil }
// Close closes the database, rendering it unusable for I/O, by deallocating // the underlying handle. // // Any attempts to use the DB after Close is called will panic. func (db *DB) Close() { C.rocksdb_close(db.Ldb) }
// Release closes the database. func (db *DB) Release() { C.rocksdb_close(db.c) }