阅读新闻

一条检测内存泄露的函数.

[日期:2007-04-02] 来源:  作者: [字体: ]
         
_CrtDumpMemoryLeaks

Dumps all of the memory blocks in the debug heap when a memory leak has occurred (debug version only).

int _CrtDumpMemoryLeaks( void );

Routine Required Header Compatibility
_CrtDumpMemoryLeaks <crtdbg.h> Win NT, Win 95

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBCD.LIB Single thread static library, debug version
LIBCMTD.LIB Multithread static library, debug version
MSVCRTD.LIB Import library for MSVCRTD.DLL, debug version

Return Value

_CrtDumpMemoryLeaks returns TRUE if a memory leak is found; otherwise, the function returns FALSE.

仅仅DEBUG模式起作用.


阅读:
录入:admin

评论 】 【 推荐 】 【 打印
上一篇:一个通用的单体模板
下一篇:迭代器使用举例
相关新闻      
本文评论       全部评论
发表评论
字数
姓名:

  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款