开发者

Using AfxEnableMemoryTracking to detect Memory leaks

Has anybody personally used

AfxEnableMemoryTracking function prov开发者_StackOverflowided 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜