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:

<pre lang="cpp">#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