Debug窗口输出如下,如何定位错误,可能是如何引起的?多谢!
The thread 0x198 has exited with code 0 (0x0).
Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called.
Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called.
Detected memory leaks!
Dumping objects ->
{49} normal block at 0x00CC0030, 4 bytes long.
 Data: <N   > 4E 04 00 00 
Object dump complete.
The thread 0x208 has exited with code 2 (0x2).
The thread 0x6C8 has exited with code 2 (0x2).
The program 'E:\vcprog\larm.exe' has exited with code 2 (0x2).

解决方案 »

  1.   

    1.双击提示信息,一般能够跳转到代码处
    2。不能跳转,就装个BoundsChecker
      

  2.   

    解决了上面问题,可是在boundschecker中有如下的一个内存泄露,在debug中看不出来,为何?
    谢谢楼上这位!
    提示信息如下:
    Memory leak.320 byte allocated by HeapAlloc in sbheap.c(102),Handle 0x02761E90我的源文件没有这个文件呀!
      

  3.   

    就是你新建一个工程用boundscheker,也会发现有几处,不用管它..
      

  4.   

    给子窗口发送消息(比如WM_CLOSE)
    子窗口处理这个消息到后清理资源,关闭就可以了
      

  5.   

    主线程退出前要WaitForMultipleObjects,等待所有线程退出后才真正退出。