Exemple #1
0
func tabixCloser(t *Tabix) {
	if t.tbx != nil {
		C.tbx_destroy(t.tbx)
	}
	if t.htf != nil {
		C.hts_close(t.htf)
	}
	if t.hdr != nil {
		C.bcf_hdr_destroy(t.hdr)
	}
}
Exemple #2
0
func _close(t *Tbx) {
	if t.tbx != nil {
		C.tbx_destroy(t.tbx)
	}
	if t.htfs != nil {
		for htf := range t.htfs {
			C.hts_close(htf)
		}
	}
	if t.kCache != nil {
		for kstr := range t.kCache {
			C.free(unsafe.Pointer(kstr.s))
		}
	}
	close(t.htfs)
	close(t.kCache)
}