Make use of Visual C++ runtime memory leak tracing

This commit is contained in:
Dmitry-Me 2014-03-26 19:43:12 +04:00
parent f71a4ad216
commit d0e51fb5f0
2 changed files with 11 additions and 0 deletions

View File

@ -108,6 +108,11 @@ void CheckOther::checkZeroDivision()
*/
int main(int argc, char* argv[])
{
// MS Visual C++ memory leak debug tracing
#if defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF);
#endif
CppCheckExecutor exec;
#ifdef _WIN32
char exename[1024] = {0};

View File

@ -13,4 +13,10 @@
# define CPPCHECKLIB
#endif
// MS Visual C++ memory leak debug tracing
#if defined(_MSC_VER) && defined(_DEBUG)
# define _CRTDBG_MAP_ALLOC
# include <crtdbg.h>
#endif
#endif // configH