Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Heinrich Fenkart
OS Primes
Commits
873d49bf
Verified
Commit
873d49bf
authored
Jun 05, 2019
by
Heinrich Fenkart
Browse files
Clean up allocated memory in pthread implementation
parent
007c0419
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
pthread.cpp
pthread.cpp
+7
-0
No files found.
pthread.cpp
View file @
873d49bf
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment