mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 11:40:46 +08:00
fix: remove memory leak (#2532)
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user