请教,利用VC检测内存泄露的问题
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include<stdlib.h>
#include<crtdbg.h>
#endif
在程序的退出点添加了如下代码:
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
当我运行Debug模式并退出程序时,有如下输出:
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324230} normal block at 0x011100B0, 33 bytes long.
Data: < 1 > 00 31 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324228} normal block at 0x031E7768, 33 bytes long.
Data: < 0 > 00 30 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324176} normal block at 0x03095058, 33 bytes long.
Data: < identify_text > 00 69 64 65 6E 74 69 66 79 5F 74 65 78 74 00 CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324175} normal block at 0x033C5250, 116 bytes long.
Data: < Q ~ > F0 ED 51 00 00 00 00 00 7E 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324174} normal block at 0x030950C0, 33 bytes long.
Data: < 1 > 00 31 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324173} normal block at 0x030953B8, 60 bytes long.
Data: <4|Q r > 34 7C 51 00 00 00 00 00 72 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324171} normal block at 0x03092508, 33 bytes long.
Data: < sence_id > 00 73 65 6E 63 65 5F 69 64 00 CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324170} normal block at 0x03093EA0, 116 bytes long.
Data: < Q h > F0 ED 51 00 00 00 00 00 68 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324169} normal block at 0x03092570, 33 bytes long.
Data: < 0 > 00 30 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324168} normal block at 0x031A8ED0, 60 bytes long.
Data: <4|Q \ > 34 7C 51 00 00 00 00 00 5C 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324166} normal block at 0x030B93E0, 33 bytes long.
Data: < flash_id > 00 66 6C 61 73 68 5F 69 64 00 CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324165} normal block at 0x030910C8, 116 bytes long.
Data: < Q R > F0 ED 51 00 00 00 00 00 52 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324164} normal block at 0x030B9448, 33 bytes long.
Data: < 0 > 00 30 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324163} normal block at 0x030920D0, 60 bytes long.
Data: <4|Q D > 34 7C 51 00 00 00 00 00 44 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324161} normal block at 0x0316B648, 33 bytes long.
Data: < contr_type > 00 63 6F 6E 74 72 5F 74 79 70 65 00 CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324160} normal block at 0x034BE408, 116 bytes long.
Data: < Q 8 > F0 ED 51 00 00 00 00 00 38 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324158} normal block at 0x0316EC98, 33 bytes long.
Data: < identify_msg > 00 69 64 65 6E 74 69 66 79 5F 6D 73 67 00 CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324157} normal block at 0x0323A280, 116 bytes long.
Data: < Q * > F0 ED 51 00 00 00 00 00 2A 00 00 00 00 00 00 00
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324156} normal block at 0x0316EC30, 33 bytes long.
Data: < SHIFT-JIS > 00 53 48 49 46 54 2D 4A 49 53 00 CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324153} normal block at 0x0316BF50, 33 bytes long.
Data: < 1.0 > 00 31 2E 30 00 CD CD CD CD CD CD CD CD CD CD CD
f:\program files\microsoft visual studio\vc98\include\crtdbg.h(552) : {324150} normal block at 0x0310B240, 104 bytes long.
Data: <D Q > 44 EF 51 00 00 00 00 00 00 00 00 00 00 00 00 00
。。。。。。。。。。
这个报告指明产生内存泄露问题的内存申请点是:(在crtdbg.h文件中)
#ifdef _CRTDBG_MAP_ALLOC
inline void* __cdecl operator new(unsigned int s)
{ return ::operator new(s, _NORMAL_BLOCK, __FILE__, __LINE__); }
#endif /* _CRTDBG_MAP_ALLOC */
我本来是要定位自己的源代码文件中产生内存泄露问题的内存申请点的,结果全指向了crtdbg.h中的这一条语句,这样我就不知道在哪一块申请的内存造成了内存泄露。
请教各位高手,我该如何解决这个问题,才能使我的内存泄露检测变得有意义?多谢了。
相关推荐
基于网易新闻+评论的舆情热点分析平台源代码(python毕业设计完整源码+LW).zip
基于网易新闻+评论的舆情热点分析平台源代码(python毕业设计完整源码+LW).zip
基于python的基于网易新闻+评论的舆情热点分析平台.zip
基于python的基于网易新闻+评论的舆情热点分析平台.zip
【基于Python+Django的毕业设计】基于网易新闻+评论的舆情热点分析平台(源码+录像演示+说明).zip
【基于Python+Django的毕业设计】基于网易新闻+评论的舆情热点分析平台(源码+录像演示+说明).zip 【项目技术】 python+Django+mysql 【实现功能】 网站前台: (1)用户可以在不登录的情况下访问本系统,但是不能进行数据的分析,也不能对自己的个人信息进行修改。 (2)用户的注册与登录:游客想要在一个网站对自己的信息进行修改的话,需要经过一系列的有验证信息的注册,成为网站的正式用户后,可以编辑或修改自己的个人信息。 (3)评论分析:用户可以在网站内对所有的评论进行查看和分析。 (4)个人信息:通过个人信息查看功能可以查看自己的个人信息,还可以对密码进行修改。 (5)系统简介:用户可以在网站的首页上查看系统的信息,如用户数量、新闻数量、评价数量等信息。 网站后台: (6)用户信息管理:管理员可以查看和维护网站内所有的用户信息,可以通过用户的编号或者用户名进行查找,查找到具体的用户后可以对用户的信息进行修改,也可以直接删除用户的信息。 (7)新闻管理模块:后台管理员可以对网站内的新闻信息进行管理,比如可以查看当前系统内的所有新闻信息,还可以对其进行维护和删除。 (8)评论信息管理模块:管理员可以查看已有的所有评论信息并对
python毕业设计之基于网易新闻+评论的舆情热点分析平台源码.zip
python毕设,完整前后端源码,包含数据库,项目可正常运行。
基于python网易新闻+评论的舆情热点分析平台源码数据库.zip
基于python网易新闻+评论的舆情热点分析平台源码数据库.zip


