func (self *Leveldb) Close() error { C.leveldb_close(self.cdb) C.leveldb_readoptions_destroy(self.read_options) C.leveldb_writeoptions_destroy(self.write_options) C.leveldb_cache_destroy(self.cache) return nil }
func (db *DB) Close() error { if db.db != nil { C.leveldb_close(db.db) db.db = nil } db.opts.Close() if db.cache != nil { db.cache.Close() } if db.filter != nil { db.filter.Close() } db.readOpts.Close() db.writeOpts.Close() db.iteratorOpts.Close() return 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.leveldb_close(db.Ldb) }
// Close the database func (db *LevelDB) Close() { C.leveldb_close(db.CLevelDB) }
func (ldb *Db) Close() { C.leveldb_close(ldb.ldb) }