-
Notifications
You must be signed in to change notification settings - Fork 85
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
Incorrect use of the delete expression in MetaPointCloud.cu generates memory leaks #102
Comments
Hi, thanks for the report! On first look it might be a good idea to replace all/most of the new[] uses in there with boost::scoped_array, to guarantee correct cleanup: https://www.boost.org/doc/libs/1_70_0/libs/smart_ptr/doc/html/smart_ptr.html#scoped_array |
I will attempt to get the new release with the fixes out before my vacation. |
Hello, I just realized that you created another branch for indigo and you left the main branch with c++ 11 by default. |
Yes, This would also mean that C++11 mode will be mandatory for future GPU-Voxels releases. |
As a side-note, one complication with regard to MetaPointCloud is the presence of raw device pointers as well as non-owning pointer there. This means that we can use smart pointers for the host memory, but some raw device pointers will remain. |
Hello
I was making some memory leak checks of my code using Valgrind and I tracked some bugs in the library. In this line on MetaPointCoud you assign the array like this
But in the destruct() method, when you delete it, you are only deleting the first one of them but not the rest
Instead of that, it should be like:
The problem is also with
m_point_clouds_local->clouds_base_addresses
and maybe there are more things like this in the file but i didn't check it completly. Here I put a part of the Valgrind result. The lines that appear here wont mach what I wrote before, because right now I am using the preovius commit of this library. The problem is the same anywayThe text was updated successfully, but these errors were encountered: