Skip to content

Commit

Permalink
make sure to deallocate before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed May 29, 2024
1 parent a7ab7bb commit a91397c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/total-least-squares/tls_dense_skop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ int main(int argc, char* argv[]){
double scale = blas::nrm2(n, true_x, 1);
std::cout << "||sketch_x - true_x|| / ||true_x|| : " << distance/scale << "\n\n";

delete[] delta;
delete[] true_x;
delete[] AB;
delete[] SAB;
Expand Down
1 change: 1 addition & 0 deletions examples/total-least-squares/tls_sparse_skop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ int main(int argc, char* argv[]){
double scale = blas::nrm2(n, true_x, 1);
std::cout << "||sketch_x - true_x|| / ||true_x|| : " << distance/scale << "\n\n";

delete[] delta;
delete[] true_x;
delete[] AB;
delete[] SAB;
Expand Down

0 comments on commit a91397c

Please sign in to comment.