Verified Commit 873d49bf authored by Heinrich Fenkart's avatar Heinrich Fenkart
Browse files

Clean up allocated memory in pthread implementation

parent 007c0419
......@@ -131,5 +131,12 @@ int main (int argc, char **argv) {
assert((primes.size() == 1782219));
assert((primes.at(primes.size() - 1) == 30048731));
// clean up
for (int i {0}; i < threads_count; ++i)
delete results[i];
delete[] threads;
delete[] threads_data;
delete[] results;
return 0;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment