注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

mie

 
 
 

日志

 
 

VC 2010 + MFC:CMFCButton存在比较严重的内存泄露,最好别使用  

2010-12-18 20:39:57|  分类: Windows系统BUG搜 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
Detected memory leaks!
Dumping objects ->
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {28743} normal block at 0x011A0C48, 164 bytes long.
 Data: <               x> 00 00 00 00 00 00 00 00 C5 9D 1C 81 98 CF B1 78
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\map_sp.cpp(83) : {28742} normal block at 0x0119D2A0, 68 bytes long.
 Data: <    L           > 00 00 00 00 4C 0C 1A 01 00 00 00 00 00 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\afxtooltipctrl.cpp(39) : {28741} client block at 0x011A0B10, subtype c0, 252 bytes long.
a CMFCToolTipCtrl object at $011A0B10, 252 bytes long
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\plex.cpp(29) : {28661} normal block at 0x011A0630, 164 bytes long.
 Data: <               x> 00 00 00 00 00 00 00 00 C5 9D 1C 81 98 CF B1 78
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\map_sp.cpp(83) : {28660} normal block at 0x0119D350, 68 bytes long.
 Data: <    4           > 00 00 00 00 34 06 1A 01 00 00 00 00 00 00 00 00
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\afxtooltipctrl.cpp(39) : {28659} client block at 0x011A04F8, subtype c0, 252 bytes long.
a CMFCToolTipCtrl object at $011A04F8, 252 bytes long
Object dump complete.

其中有一处是CMFCButton使用CToolTipCtrl实现信息提示时导致的,函数调用堆栈信息如下:
>    msvcr100d.dll!_heap_alloc_dbg_impl(unsigned int nSize=68, int nBlockUse=1, const char * szFileName=0x7863cd10, int nLine=83, int * errno_tmp=0x0012df24)  行 393    C++
     msvcr100d.dll!_nh_malloc_dbg_impl(unsigned int nSize=68, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x7863cd10, int nLine=83, int * errno_tmp=0x0012df24)  行 239 + 0x19 字节    C++
     msvcr100d.dll!_nh_malloc_dbg(unsigned int nSize=68, int nhFlag=0, int nBlockUse=1, const char * szFileName=0x7863cd10, int nLine=83)  行 302 + 0x1d 字节    C++
     msvcr100d.dll!_malloc_dbg(unsigned int nSize=68, int nBlockUse=1, const char * szFileName=0x7863cd10, int nLine=83)  行 160 + 0x1b 字节    C++
     mfc100ud.dll!operator new(unsigned int nSize=68, int nType=1, const char * lpszFileName=0x7863cd10, int nLine=83)  行 379 + 0x16 字节    C++
     mfc100ud.dll!operator new[](unsigned int nSize=68, int nType=1, const char * lpszFileName=0x7863cd10, int nLine=83)  行 411 + 0x15 字节    C++
     mfc100ud.dll!operator new[](unsigned int nSize=68, const char * lpszFileName=0x7863cd10, int nLine=83)  行 62 + 0x13 字节    C++
     mfc100ud.dll!CMapStringToPtr::InitHashTable(unsigned int nHashSize=17, int bAllocNow=1)  行 83 + 0x20 字节    C++
     mfc100ud.dll!CMapStringToPtr::operator[](const wchar_t * key=0x01185ca8)  行 239    C++
     mfc100ud.dll!CMapStringToPtr::SetAt(const wchar_t * key=0x01185ca8, void * newValue=0x00000000)  行 628 + 0x15 字节    C++
     mfc100ud.dll!CToolTipCtrl::OnAddTool(unsigned int wParam=0, long lParam=1237964)  行 92    C++
     mfc100ud.dll!CWnd::OnWndMsg(unsigned int message=1074, unsigned int wParam=0, long lParam=1237964, long * pResult=0x0012e1d0)  行 2330 + 0x11 字节    C++
     mfc100ud.dll!CWnd::WindowProc(unsigned int message=1074, unsigned int wParam=0, long lParam=1237964)  行 2067 + 0x20 字节    C++
     mfc100ud.dll!AfxCallWndProc(CWnd * pWnd=0x01185208, HWND__ * hWnd=0x003409ee, unsigned int nMsg=1074, unsigned int wParam=0, long lParam=1237964)  行 248 + 0x1c 字节    C++
     mfc100ud.dll!AfxWndProc(HWND__ * hWnd=0x003409ee, unsigned int nMsg=1074, unsigned int wParam=0, long lParam=1237964)  行 411    C++
     mfc100ud.dll!AfxWndProcBase(HWND__ * hWnd=0x003409ee, unsigned int nMsg=1074, unsigned int wParam=0, long lParam=1237964)  行 420 + 0x15 字节    C++
     user32.dll!77e2b6e3()    
     [下面的框架可能不正确和/或缺失,没有为 user32.dll 加载符号]   
     user32.dll!77e2b874()    
     user32.dll!77e2b82a()    
     user32.dll!77e2c2d3()    
     user32.dll!77e2c337()    
     mfc100ud.dll!CToolTipCtrl::AddTool(CWnd * pWnd=0x01184730, const wchar_t * lpszText=0x01185ca8, const tagRECT * lpRectTool=0x00000000, unsigned int nIDTool=0)  行 154    C++
     mfc100ud.dll!CMFCButton::SetTooltip(const wchar_t * lpszToolTipText=0x01185ca8)  行 1006    C++
     mfc100ud.dll!CMFCButton::OnInitControl(unsigned int wParam=369, long lParam=5807177)  行 1542    C++
     mfc100ud.dll!CWnd::OnWndMsg(unsigned int message=892, unsigned int wParam=369, long lParam=5807177, long * pResult=0x0012e630)  行 2330 + 0x11 字节    C++
     mfc100ud.dll!CWnd::WindowProc(unsigned int message=892, unsigned int wParam=369, long lParam=5807177)  行 2067 + 0x20 字节    C++
     mfc100ud.dll!AfxCallWndProc(CWnd * pWnd=0x01184730, HWND__ * hWnd=0x001c09ae, unsigned int nMsg=892, unsigned int wParam=369, long lParam=5807177)  行 248 + 0x1c 字节    C++
     mfc100ud.dll!AfxWndProc(HWND__ * hWnd=0x001c09ae, unsigned int nMsg=892, unsigned int wParam=369, long lParam=5807177)  行 411    C++
     mfc100ud.dll!AfxWndProcBase(HWND__ * hWnd=0x001c09ae, unsigned int nMsg=892, unsigned int wParam=369, long lParam=5807177)  行 420 + 0x15 字节    C++
     user32.dll!77e2b6e3()    
     user32.dll!77e2b874()    
     user32.dll!77e2b82a()    
     user32.dll!77e2c2d3()    
     user32.dll!77e2c337()    
     user32.dll!77e1730e()    
     mfc100ud.dll!CWnd::ExecuteDlgInit(void * lpResource=0x00589ac8)  行 4565 + 0x1f 字节    C++
     mfc100ud.dll!CWnd::ExecuteDlgInit(const wchar_t * lpszResourceName=0x0000013d)  行 4484 + 0xc 字节    C++
     mfc100ud.dll!CFormView::Create(const wchar_t * __formal=0x00000000, const wchar_t * __formal=0x00000000, unsigned long dwRequestedStyle=1350565888, const tagRECT & rect={...}, CWnd * pParentWnd=0x0119d128, unsigned int nID=59648, CCreateContext * pContext=0x0012f758)  行 127 + 0x12 字节    C++
     mfc100ud.dll!CFrameWnd::CreateView(CCreateContext * pContext=0x0012f758, unsigned int nID=59648)  行 643 + 0x33 字节    C++
     mfc100ud.dll!CFrameWnd::OnCreateClient(tagCREATESTRUCTW * __formal=0x0012ef00, CCreateContext * pContext=0x0012f758)  行 664 + 0x11 字节    C++
     mfc100ud.dll!CFrameWnd::OnCreateHelper(tagCREATESTRUCTW * lpcs=0x0012ef00, CCreateContext * pContext=0x0012f758)  行 683 + 0x18 字节    C++
     mfc100ud.dll!CMDIChildWnd::OnCreate(tagCREATESTRUCTW * lpCreateStruct=0x0012ef00)  行 1051    C++
     mfc100ud.dll!CMDIChildWndEx::OnCreate(tagCREATESTRUCTW * lpCreateStruct=0x0012ef00)  行 154 + 0xc 字节    C++
     AdminConsole.exe!CChildFrame::OnCreate(tagCREATESTRUCTW * lpCreateStruct=0x0012ef00)  行 69 + 0xc 字节    C++
     mfc100ud.dll!CWnd::OnWndMsg(unsigned int message=1, unsigned int wParam=0, long lParam=1240832, long * pResult=0x0012ecb0)  行 2326 + 0xd 字节    C++
     mfc100ud.dll!CWnd::WindowProc(unsigned int message=1, unsigned int wParam=0, long lParam=1240832)  行 2067 + 0x20 字节    C++
     mfc100ud.dll!AfxCallWndProc(CWnd * pWnd=0x0119d128, HWND__ * hWnd=0x00090888, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1240832)  行 248 + 0x1c 字节    C++
     mfc100ud.dll!AfxWndProc(HWND__ * hWnd=0x00090888, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1240832)  行 411    C++
     mfc100ud.dll!AfxWndProcBase(HWND__ * hWnd=0x00090888, unsigned int nMsg=1, unsigned int wParam=0, long lParam=1240832)  行 420 + 0x15 字节    C++
     user32.dll!77e2b6e3()    
     user32.dll!77e4a96d()    
     user32.dll!77e2b82a()    
     user32.dll!77e2c8b8()    
     user32.dll!77e222f3()    
     ntdll.dll!7c958536()    
     user32.dll!77e2228d()    
     user32.dll!77e22249()    
     user32.dll!77e1c053()    
     user32.dll!77e1775a()    
     user32.dll!77e1c053()    
     user32.dll!77e1775a()    
     user32.dll!77e17637()    
     user32.dll!77e1c0c5()    
     user32.dll!77e1c053()    
     user32.dll!77e3705d()    
     user32.dll!77e36f6c()    
     user32.dll!77e2c337()    
     mfc100ud.dll!CMDIChildWnd::Create(const wchar_t * lpszClassName=0x00155df0, const wchar_t * lpszWindowName=0x0119d690, unsigned long dwStyle=1087340544, const tagRECT & rect={...}, CMDIFrameWnd * pParentWnd=0x01163dc8, CCreateContext * pContext=0x0012f758)  行 545 + 0x1b 字节    C++
     mfc100ud.dll!CMDIChildWnd::LoadFrame(unsigned int nIDResource=128, unsigned long dwDefaultStyle=1087340544, CWnd * pParentWnd=0x00000000, CCreateContext * pContext=0x0012f758)  行 615 + 0x3b 字节    C++
     mfc100ud.dll!CDocTemplate::CreateNewFrame(CDocument * pDoc=0x0119d010, CFrameWnd * pOther=0x00000000)  行 294 + 0x22 字节    C++
     mfc100ud.dll!CMultiDocTemplate::OpenDocumentFile(const wchar_t * lpszPathName=0x00000000, int bAddToMRU=1, int bMakeVisible=1)  行 125 + 0x13 字节    C++
     mfc100ud.dll!CMultiDocTemplate::OpenDocumentFile(const wchar_t * lpszPathName=0x00000000, int bMakeVisible=1)  行 110    C++


By:zhanyonhu
  评论这张
 
阅读(4239)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016