Убрал утечку памяти
This commit is contained in:
parent
673d0e250d
commit
c6539e2868
4 changed files with 47 additions and 8 deletions
|
|
@ -28,6 +28,9 @@ void sort(double * array, int length) {
|
|||
for (int i = index; i < length; ++i) array[i] = zero[i - index];
|
||||
|
||||
timer += clock();
|
||||
free(zero);
|
||||
free(unit);
|
||||
|
||||
printf("Required time for sorting is %lf seconds\n", (double)timer / CLOCKS_PER_SEC);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue