// Destroy deallocates the Options object. func (opts *Options) Destroy() { C.rocksdb_options_destroy(opts.c) if opts.ccmp != nil { C.rocksdb_comparator_destroy(opts.ccmp) } if opts.cmo != nil { C.rocksdb_mergeoperator_destroy(opts.cmo) } if opts.cst != nil { C.rocksdb_slicetransform_destroy(opts.cst) } if opts.ccf != nil { C.rocksdb_compactionfilter_destroy(opts.ccf) } opts.c = nil opts.env = nil opts.bbto = nil }
// Destroy deallocates the Options object. func (self *Options) Destroy() { C.rocksdb_options_destroy(self.c) if self.ccmp != nil { C.rocksdb_comparator_destroy(self.ccmp) } if self.cmo != nil { C.rocksdb_mergeoperator_destroy(self.cmo) } if self.cst != nil { C.rocksdb_slicetransform_destroy(self.cst) } if self.ccf != nil { C.rocksdb_compactionfilter_destroy(self.ccf) } self.c = nil self.cmp = nil self.mo = nil self.env = nil self.st = nil self.cf = nil self.bbto = nil }
// DestroyComparator deallocates a *C.rocksdb_comparator_t. // // This is provided as a convienience to advanced users that have implemented // their own comparators in C in their own code. func DestroyComparator(cmp *C.rocksdb_comparator_t) { C.rocksdb_comparator_destroy(cmp) }
func (cmp *Comparator) Close() { C.rocksdb_comparator_destroy(cmp.Comparator) }