开发者

Using AfxEnableMemoryTracking to detect Memory leaks

开发者 https://www.devze.com 2023-01-11 20:17 出处:网络
Has anybody personally used AfxEnableMemoryTrackingfunction prov开发者_StackOverflowided by MFC to detect memory leaks. How useful is it?Memory tracking is enabled by default in MFC Debug builds. A

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

精彩评论

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