ccbuluo / duilib

Automatically exported from code.google.com/p/duilib
0 stars 0 forks source link

程序结束内存泄露 #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
看了下例子程序,    
void Notify(TNotifyUI& msg)
{
     if( msg.sType == _T("windowinit") ) OnPrepare();
     else if( msg.sType == _T("click") ) {
    if( msg.pSender == m_pCloseBtn ) {
        PostQuitMessage(0);
        return; 
    }
有close按钮的例子都是通过PostQuitMessage退出,导致,void 
OnFinalMessage(HWND /*hWnd*/) { delete this; };
不能被调用,所有的控件资源都没有被释放的吧。这个问题��
�该怎么解决?
为什么例子里面都是这么写。

Original issue reported on code.google.com by lixiao...@gmail.com on 5 Apr 2013 at 2:03

GoogleCodeExporter commented 8 years ago
应该调用这个退出DestroyWindow

Original comment by yuheng0...@gmail.com on 11 Apr 2013 at 2:51

GoogleCodeExporter commented 8 years ago
调用  PostMessage(WM_CLOSE,0,0);    

Original comment by b123146...@gmail.com on 20 Aug 2013 at 7:56