Skip to content

Commit

Permalink
Merge pull request Apress#27 from vinmierlak/ch1_code_edits
Browse files Browse the repository at this point in the history
Added calls to free() to prevent memory leaks.
  • Loading branch information
jamesreinders authored Nov 18, 2021
2 parents 7626457 + a05ef05 commit d4c649d
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 d4c649d

Please sign in to comment.