I have added the following to the end of my main and I get the memory leak report but there is no break point created showing where the leak occurs in my code when I run it in debug mode. I am using VS c++ 2010 express. Is there something that I am doing wrong or something wrong with the code that I added. I can post more of the code if it would be helpful.
#ifdef _WIN32 if (_CrtDumpMemoryLeaks()) { cout << "Memory leaks!" << endl; } #endif #ifdef _DEBUG int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); flag |= _CRTDBG_LEAK_CHECK_DF; // Turn on leak-checking bit _CrtSetDbgFlag(flag); _CrtSetBreakAlloc(427); #endif