wzf881116
Start_wu
采纳率50%
2013-12-25 08:50

请哪位大神帮忙解决下这个问题-内存泄露

已采纳

请哪位大神帮忙解决下这个问题,实在是找不到哪个地方内存泄露,凡是代码中用到new的,我都delete了。。。
Detected memory leaks!
Dumping objects ->
{107} normal block at 0x00206188, 21 bytes long.
Data: < l| > A8 6C 7C 00 04 00 00 00 04 00 00 00 01 00 00 00
{106} normal block at 0x00206130, 21 bytes long.
Data: < l| > A8 6C 7C 00 04 00 00 00 04 00 00 00 01 00 00 00
{105} normal block at 0x002060D8, 28 bytes long.
Data: < l| > A8 6C 7C 00 0B 00 00 00 0B 00 00 00 01 00 00 00
{76} normal block at 0x00205010, 49 bytes long.
Data: < l| > A8 6C 7C 00 04 00 00 00 20 00 00 00 01 00 00 00
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\occmgr.cpp(195) : {75} normal block at 0x00204F30, 160 bytes long.
Data: < > E8 03 00 00 00 00 00 00 FF FF FF FF 00 00 00 00
{74} normal block at 0x00204EA0, 84 bytes long.
Data: < > FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

3条回答

  • perlinson perlinson 8年前

    在app类的构造函数中调用

    _CrtSetBreakAlloc(107) 定位第一个

    程序中断后 调用堆栈 查看 泄露的位置

    点赞 评论 复制链接分享
  • perlinson perlinson 8年前

    C******App::C****App()
    {
    // TODO: add construction code here,
    // Place all significant initialization in InitInstance
    _CrtSetBreakAlloc(107);
    }

    如果是win32 程序的话 按f10 然后 在监视窗口输入 _crtBreakAlloc 修改为107 然后f5继续

    点赞 1 评论 复制链接分享
  • weiyuan2011 weiyuan2011 8年前
    点赞 评论 复制链接分享

相关推荐