How do you test for memory leaks?
On 09/02/2014 at 17:38, xxxxxxxx wrote:
Cinema 4D Version: 13,14,15
Platform: Windows ;
Language(s) : C++ ;
I develop in Visual Studio, until now 2010, but have switched to VS 2012.
I wonder how you test for memory leaks?
I tries this Visual Leak Detector, http://vld.codeplex.com/ but got so many problems and C4D crashes, that I gave it up. At least until someone can tell me how to use it in C4D plugins.
On 10/02/2014 at 00:58, xxxxxxxx wrote:
The debug version of the CINEMA API has automatic memory leak detection.
To enable it you have to set the command line parameter -g_alloc=debug.
Debug Information and Stability and Testing pages in the C++ documentation contains information about debugging memory leaks.
On 10/02/2014 at 09:56, xxxxxxxx wrote:
Originally posted by xxxxxxxx
thanks! It is a little embarrassing that I have not studied these documents before, but I have been carried away, by all the opportunities there is in the SDK to add great new functions to C4D with plug-ins. I have now come that far that performance optimization and memory leak detection is on the agenda. I learnt a lot reading those documents!
On 10/06/2014 at 02:04, xxxxxxxx wrote:
where do I set this parameter? I put it in the "Command Arguments" property on the "Configuration Properties->Debugging" tab (VC Express 2010), but no console window comes up when debugging. Maybe because of running x64?
Solved: I put an empty c4d_debug.txt file in the working directory and the console window comes up now.