Free Application to check Memory Leaks in Windows x64? Free Application to check Memory Leaks in Windows x64? c c

Free Application to check Memory Leaks in Windows x64?


I suggest using visual leak detector as it have served me well several times. You may also try to use valgrind for windows (although I had little success on doing that).Dr. Memory also helped me a few times.

EDIT: also have a look here.


The CRT library has its own memory leak detection mechanism. The output is not as detailed as what Visual Leak Detector gives you, but it is a lot faster than VLD (which easily runs for dozens of minutes after the program exits).

To enable CRT memory leak detection place the following at the beginning of stdafx.h (or somewhere else suitable):

#define _CRTDBG_MAP_ALLOC#include <stdlib.h>#include <crtdbg.h>

Add the following right before the program's exit point(s):

_CrtDumpMemoryLeaks();

When _CrtDumpMemoryLeaks() is called it prints all leaked memory it can find to the output window.

More information on MSDN.

Note: When I used this I only got the less detailed output without line numbers although I had defined _CRTDBG_MAP_ALLOC right at the beginning of stdafx.h.