Skip to content

Commit

Permalink
Added calls to free() to prevent memory leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinmierlak committed Sep 3, 2021
1 parent 22f9197 commit a05ef05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions samples/Ch01_intro/fig_1_1_hello.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ int main() {
}).wait();

std::cout << result << "\n";
free(result, Q);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions samples/Ch01_intro/fig_1_3_race.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ int main() {
}).wait();

std::cout << result << "\n";
free(result, Q);
return 0;
}

Expand Down

0 comments on commit a05ef05

Please sign in to comment.