Has anybody personally used
AfxEnableMemoryTracking
function provided by MFC
to detect memory leaks. How useful is it?
Has anybody personally used
AfxEnableMemoryTracking
function provided by MFC
to detect memory leaks. How useful is it?
Memory tracking is enabled by default in MFC Debug builds. AfxEnableMemoryTracking is mostly used to temporary disable memory tracking in some code fragments, if it is necessary. To use MFC built-in memory leaks detection, ensure that every .cpp file contains the following code after all #include lines:
#ifdef _DEBUG #define new DEBUG_NEW #endif