mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
use end_timer_delete to prevent memory leak
This commit is contained in:
parent
f08dfcf172
commit
2ac8918423
@ -187,7 +187,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
end:
|
||||
|
||||
dtime = end_timer(timer);
|
||||
dtime = end_timer_delete(timer);
|
||||
|
||||
#if defined(DEBUG) || !defined(NDEBUG)
|
||||
fclose(log_file);
|
||||
|
@ -140,7 +140,7 @@ int main(void)
|
||||
function_timer *t1 = new_timer();
|
||||
start_timer(t1);
|
||||
qr_decompose(A, Q, R, ROWS, COLUMNS);
|
||||
double dtime = end_timer(t1);
|
||||
double dtime = end_timer_delete(t1);
|
||||
|
||||
print_2d(R, ROWS, COLUMNS);
|
||||
print_2d(Q, ROWS, COLUMNS);
|
||||
|
@ -202,7 +202,7 @@ int main(int argc, char **argv)
|
||||
columns--;
|
||||
}
|
||||
eigen_vals[0] = A[0][0];
|
||||
double dtime = end_timer(t1);
|
||||
double dtime = end_timer_delete(t1);
|
||||
|
||||
#if defined(DEBUG) || !defined(NDEBUG)
|
||||
print_matrix(R, mat_size, mat_size);
|
||||
|
Loading…
Reference in New Issue
Block a user