Plugin Development - Memory Leak

Questions related to plugins development
Post Reply
JohnDoe
Posts: 3
Joined: Fri Oct 13, 2017 2:50 pm

Plugin Development - Memory Leak

Post by JohnDoe »

Any tips or tricks to keep from acquiring memory leaks? I have recently been messing with the code to work on some perosnal plugins, however am starting to notice that I have memory leaks. If i process a cloud through my plugin, and then delete the cloud from the dbtree using the UI, I see residual memory being used in my task manager (That is more memory is being used than when cloudcompare was launched, however theres no clouds being stored - at least not to the users vision)

If you have any advice for tracing, tracking, and fixing memory leaks, it would be greatly appreciated.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Plugin Development - Memory Leak

Post by daniel »

It depends on what OS and IDE you are working with.

Personally I used Visual Studio and Visual Leak Detector (which can be 'enabled' in the CMake configuration of CC - you first have to install VLD of course).

Otherwise I know Valgrind on linux is very powerful.
Daniel, CloudCompare admin
JohnDoe
Posts: 3
Joined: Fri Oct 13, 2017 2:50 pm

Re: Plugin Development - Memory Leak

Post by JohnDoe »

I am working on windows in visual studio as well. I will see if I can find this enabling feature later this afternoon. Thanks!
Post Reply