Ejemplo n.º 1
0
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
}
Ejemplo n.º 2
0
// Close deallocates the WriteOptions, freeing its underlying C struct.
func (wo *WriteOptions) Close() {
	C.leveldb_writeoptions_destroy(wo.Opt)
}
Ejemplo n.º 3
0
func (option *Options) Destroy_writeoptions() {
	C.leveldb_writeoptions_destroy(option.options)
}