Hi,
Currently I am detecting memory leaks with a very basic mechanism which consists of the VC++ debugger and the C runtime debug heap functions.
I have to put these lines :
at the begining of the file containing the main function of the source code to inspect.
Memory leaks are printed at the exit of the program by putting this instruction at the first line of the main :
All of this is described at:
My question is : is there a free tool(or library) that works at a higher-level? I mean that at least tells where the memory leak occurs (the class for example).
--
Globos
Currently I am detecting memory leaks with a very basic mechanism which consists of the VC++ debugger and the C runtime debug heap functions.
I have to put these lines :
Code:
#define CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
Memory leaks are printed at the exit of the program by putting this instruction at the first line of the main :
Code:
//...
int main (int argc, char** argv)
{
_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
//...
}
All of this is described at:
My question is : is there a free tool(or library) that works at a higher-level? I mean that at least tells where the memory leak occurs (the class for example).
--
Globos