mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Correctly patch the memory leak related to the apatsequence
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user