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 deallocates the underlying memory of the Cache object. func (c *Cache) Close() { C.rocksdb_cache_destroy(c.Cache) }
// Destroy deallocates the Cache object. func (self *Cache) Destroy() { C.rocksdb_cache_destroy(self.c) self.c = nil }
// Destroy deallocates the Cache object. func (c *Cache) Destroy() { C.rocksdb_cache_destroy(c.c) c.c = nil }