Skip to content

Commit

Permalink
fix: remove memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 committed Oct 2, 2023
1 parent 6376bf4 commit c4ac302
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sorting/library_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ void librarySort(int *index, int n) {
index_pos_for_output++;
}
}
delete[] numbered;
delete[] gaps;
for (int i = 0; i < 2; ++i) {
delete[] library[i];
}
}

int main() {
Expand Down

0 comments on commit c4ac302

Please sign in to comment.