Detecting Memory leak in Visual Studio (Debug mode)
Microsoft Visual Studio (2003/2005) informs about memory leakes in a module by setting the “leak check” bit, _CRTDBG_LEAK_CHECK_DF, to the debugger. The memory leak information is printed on “Output” window. [ This advantage is in “Debug” mode only. ] Example int _tmain() { int* ptr = NULL; ptr = (int*)malloc(sizeof(int)*20); for( int i=0; i<20; ++i […]