本文整理匯總了Golang中C.leveldb_close函數的典型用法代碼示例。如果您正苦於以下問題:Golang leveldb_close函數的具體用法?Golang leveldb_close怎麽用?Golang leveldb_close使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了leveldb_close函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Close
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
}
示例2: Close
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
}
示例3: Close
// 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)
}
示例4: Close
// Close the database
func (db *LevelDB) Close() {
C.leveldb_close(db.CLevelDB)
}
示例5: Close
func (ldb *Db) Close() {
C.leveldb_close(ldb.ldb)
}