Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak caused by objects not being cleaned up in visibility_compute #5

Merged
merged 2 commits into from
Oct 16, 2019

Conversation

k-chaney
Copy link
Contributor

@geopavlakos noticed that the memory usage was extremely high when using the function visibility_compute inside of a training loop. I traced it back to visibility_destructor never being called to clean up the search tree that is created when it isn't supplied as an argument.

The output of the function doesn't seem to be dependent on the search tree, so I simply delete it right before the return if it wasn't supplied as an argument. If there's a different approach that you would like, I'd be more than happy to make any changes.

@geopavlakos has been testing this fix for a while now and it has been stable without any side effects.

@k-chaney k-chaney changed the title Fix memory leak caused by objects not being cleaned up Fix memory leak caused by objects not being cleaned up in visibility_compute Feb 11, 2019
@jcpassy jcpassy changed the base branch from master to develop October 16, 2019 13:44
@jcpassy jcpassy changed the base branch from develop to issues/memory-leak-visibility October 16, 2019 13:49
@jcpassy jcpassy merged commit 2884870 into MPI-IS:issues/memory-leak-visibility Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants