Detecting C++ memory leaks in Visual Studio – again

I made a small post about detecting C++ memory leaks in Visual Studio in 2010. At the time that seemed to suffice, but some months ago someone told me about Visual Leak Detector and boy does it work.

According to the website itself

Visual Leak Detector is a free, robust, open-source memory leak detection system for Visual C++.

It’s pretty easy to use. After installing it, you just need to tell Visual C++ where to find the included header and library file.

Then it can be used with any C/C++ project simply by adding the following line to your code:

#include "vld.h"

It’s very easy to use and I tracked down a bunch of memory leaks hidden inside my code since the time I released Vizati.

As expected this is a heavy beast and debbuding while using VLD required much more memory, but totally worth it. You can even output to a file

2 Comments

  1. Sergey

    You can overload “new” operation, where you logged in all object creations. And check it after program completion. Do you try PVS studio? (http://www.viva64.com/) you can download and try it, very cool static code analyzer:) It’s can detect memory leaks and other.

  2. Pingback: Visual Leak Detector- Make It Useful To Detect Memory Leaks | Visual Leak Detector

Leave a Reply