首页  ·  知识 ·  编程语言
一条检测内存泄露的函数
网友   http://dev.csdn.net/author/cubit/02bc67f3c2cd4f418e9610afab3c760c.html    编辑:德仔   图片来源:网络
_CrtDumpMemoryLeaks Dumps all of the memory blocks in the debug heap when a memory
_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模式起作用.
本文作者:网友 来源: http://dev.csdn.net/author/cubit/02bc67f3c2cd4f418e9610afab3c760c.html
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读