life is game

(本色)
posts - 11, comments - 4, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

检查内存泄漏

Posted on 2006-11-20 13:30 原色 阅读(337) 评论(0)  编辑 收藏 引用
1.程序中添加:
#define CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

2.程序/函数结束时调用
 _CrtDumpMemoryLeaks();

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理