memory leak debugger
-
Hi everybody, I would like to know if someone could tell me if a debugger made to find memory leak problem exist for windows environment & if it's ok where i could find it? Some of my friends tell me about a software called "valgrind" which only works under linux environment! Thanks in advance for yours answers Gerald
-
Hi everybody, I would like to know if someone could tell me if a debugger made to find memory leak problem exist for windows environment & if it's ok where i could find it? Some of my friends tell me about a software called "valgrind" which only works under linux environment! Thanks in advance for yours answers Gerald
If your app uses MFC, you can use the DEBUG_NEW macro, and memory leaks will be outputted to your Output windows in Visual Studio. This even tells you the line of code where the object was "new"ed. At top of all .cpp files:
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif