Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
9dad548c
Commit
9dad548c
authored
Aug 28, 2017
by
Matthieu Schaller
Browse files
Avoid memory leak by properly freeing the gravity caches.
parent
982c7184
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
9dad548c
...
...
@@ -4687,14 +4687,14 @@ void engine_compute_next_snapshot_time(struct engine *e) {
*/
void
engine_clean
(
struct
engine
*
e
)
{
#ifdef WITH_VECTORIZATION
for
(
int
i
=
0
;
i
<
e
->
nr_threads
;
++
i
)
{
#ifdef WITH_VECTORIZATION
cache_clean
(
&
e
->
runners
[
i
].
ci_cache
);
cache_clean
(
&
e
->
runners
[
i
].
cj_cache
);
#endif
gravity_cache_clean
(
&
e
->
runners
[
i
].
ci_gravity_cache
);
gravity_cache_clean
(
&
e
->
runners
[
i
].
cj_gravity_cache
);
}
#endif
free
(
e
->
runners
);
free
(
e
->
snapshotUnits
);
free
(
e
->
links
);
...
...
Write
Preview
Supports
Markdown
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