Skip to content

Commit

Permalink
moved BWTFree() into BWTIncFree()
Browse files Browse the repository at this point in the history
BWTFree() is not for build. Only BWTIncFree() is needed.
  • Loading branch information
lh3 committed Jul 30, 2017
1 parent 0976272 commit 89a5c0c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions bwt_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,19 +1544,13 @@ BWTInc *BWTIncConstructFromPacked(const char *inputFileName, bgint_t initialMaxB
return bwtInc;
}

void BWTFree(BWT *bwt)
{
if (bwt == 0) return;
free(bwt->cumulativeFreq);
free(bwt->occValueMajor);
free(bwt->decodeTable);
free(bwt);
}

void BWTIncFree(BWTInc *bwtInc)
{
if (bwtInc == 0) return;
BWTFree(bwtInc->bwt);
free(bwtInc->bwt->cumulativeFreq);
free(bwtInc->bwt->occValueMajor);
free(bwtInc->bwt->decodeTable);
free(bwtInc->bwt);
free(bwtInc->workingMemory);
free(bwtInc->cumulativeCountInCurrentBuild);
free(bwtInc->packedShift);
Expand Down

0 comments on commit 89a5c0c

Please sign in to comment.