Correctly patch the memory leak related to the apatsequence

This commit is contained in:
2022-09-12 15:19:46 +02:00
parent 448f5f83fa
commit f6735a634e
2 changed files with 61 additions and 21 deletions

View File

@@ -291,6 +291,9 @@ func _Pcr(seq ApatSequence,
match.Recycle()
annot["reverse_error"] = errj
// log.Debugf("amplicon sequence capacity : %d", cap(amplicon.Sequence()))
results = append(results, amplicon)
}
}
@@ -364,6 +367,7 @@ func _Pcr(seq ApatSequence,
annot["reverse_error"] = erri
results = append(results, amplicon)
// log.Debugf("amplicon sequence capacity : %d", cap(amplicon.Sequence()))
}
}
}
@@ -397,6 +401,10 @@ func _PCRSlice(sequences obiseq.BioSequenceSlice,
if len(sequences) > 0 {
seq, _ := MakeApatSequence(sequences[0], options.Circular())
// if AllocatedApaSequences() == 0 {
// log.Panicln("Bizarre....")
// }
amplicons := _Pcr(seq, sequences[0], options)
if len(amplicons) > 0 {
@@ -411,6 +419,8 @@ func _PCRSlice(sequences obiseq.BioSequenceSlice,
}
}
// log.Println(AllocatedApaSequences())
// seq.Free()
}