Skip to content

Commit

Permalink
Fix nucleotide alignment memory issue
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Mar 3, 2018
1 parent db45827 commit 7e0f936
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/alignment/Matcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Matcher::Matcher(int querySeqType, int maxSeqLen, BaseMatrix *m, EvalueComputati

this->maxSeqLen = maxSeqLen;
nuclaligner=NULL;
aligner=NULL;
if(querySeqType==Sequence::NUCLEOTIDES){
nuclaligner = new BandedNucleotideAligner(m, maxSeqLen, gapOpen, gapExtend);
}else{
Expand All @@ -37,7 +38,9 @@ void Matcher::setSubstitutionMatrix(BaseMatrix *m){
}

Matcher::~Matcher(){
delete aligner;
if(aligner != NULL){
delete aligner;
}
if(nuclaligner != NULL){
delete nuclaligner;
}
Expand Down

0 comments on commit 7e0f936

Please sign in to comment.