第一个是在implement宏那里

解决方案 »

  1.   

    run debug mode ,then you can look into the memory at  0x00431240
      

  2.   

    你是不是申请了一个长度为320字节的数组,然后又忘记释放它了?
    例 int* p=new int[80];//在HEAP中申请了一个长度为320字节的数组
    忘记了:
    delete[] p
      

  3.   

    IEControlBar.cpp的第17行,把这段代码拿出来给我们看一看吧。它说你这里有问题。
      

  4.   

    第17行是这样的
        IMPLEMENT_DYNCREATE(CIEControlBar,CControlBar)
      

  5.   

    CIEControlBar::CIEControlBar() 构造函数中new了个东东
    CIEControlBar::~CIEControlBar()析构函数没舍得把那个东东释放了吧?
      

  6.   

    e:\my documents\Myprojects\myTest\IEControlBar.cpp(17)
    出错在17行!! : {73} client block at 0x00431240, subtype 0, 320 bytes long.
    内存泄漏发生在你的应用程序第73个内存块分配。
    client block是指这是一个MFC的类,地址是....   有320字节长。array_p.cpp(71) : {78} normal block at 0x00431120, 4 bytes long.
    第71行,78次分配内存块,normal block是指你的程序分配的,4字节!这里最有用的是内存分配计算,通过这个计数可以在调试器的watch窗口进行定位,然后
    用call stack看看前因!!