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

Memory leak #11

Open
mys007 opened this issue Oct 6, 2016 · 1 comment
Open

Memory leak #11

mys007 opened this issue Oct 6, 2016 · 1 comment

Comments

@mys007
Copy link

mys007 commented Oct 6, 2016

I have observed a memory leak in Indices filled by KdTree.radiusSearch() or KdTree.nearestKSearch() and read by Indices.viewAsTensor() afterwards. Calling an explicit storage():free() on the obtained tensor's storage then seems necessary.

@andreaskoepf
Copy link
Member

Hi @mys007! Thanks for reporting the issue. Do you have a little code snippet that reproduces the leak? Calling storage():free() on the Tensor returned by Indices.viewAsTensor() should normally not be necessary because the Tensor is just a view into internal vector memory, no real copy of the data (see indices.cpp). Have you checked that a no longer referenced object will not be freed by a collectgarbage() call?

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

No branches or pull requests

2 participants