T
txholdem
Guest
Dear Visual C++ / MFC group.
Can someone at Visual C++ / MFC group look at MDI client tab (memory consumption) over long period run?
I am currently debug memory consumption (eat memory) over marathon test run. I turn ON MDI tab by called EnableMDITab(....). I have my application run over night and cycle MDI client title text labels. In the morning, I see memory start from 31MB to 90MB in Window Task Manager. If I disabled (Turn OFF) MDI client tab, I only see 31MB. So there are memory consumption some where in the MDI / MFC framework. I have 15 MDI clients windows during long test. In the application, the Application title and MDI client label text changes quite often. By tracking MFC framework, the title update trigger called into CMDIChildWndEx::OnSetText(LPCTSTR lpszText) which in turn called m_pMDIFrame->m_wndClientArea.UpdateTabs(TRUE); and m_Impl.OnSetText(lpszText).
By review the CMDIClientAreaWnd::UpdateTabs(BOOL bSetActiveTabVisible) function, the while loop simply go through all MDI client windows and updated tab icons and tab labels (window caption). If iTabIndex not available, then add new tab into m_wndTab.AddTab(...). So, my investigation by put a debug break point at line 1256: m_wndTab.AddTab(pWndChild, strTabLabel, iIcon); after all MDI client tab already created, however, in long marathon run, I didn't see the debug break. So, now I am thinking of MDI document framework is tracking tab and consumption memory in the MFC/Win32, somewhere that I can't pin point.
Turn MDI client tab OFF:
EnableMDITabs(false);
EnableMDITabbedGroups(false, params);
Turn MDI client tab ON:
EnableMDITabs(true, 0, CMFCBaseTabCtrl::LOCATION_BOTTOM, 1, CMFCTabCtrl::STYLE_3D_ONENOTE);
Thank You
Mike
Continue reading...
Can someone at Visual C++ / MFC group look at MDI client tab (memory consumption) over long period run?
I am currently debug memory consumption (eat memory) over marathon test run. I turn ON MDI tab by called EnableMDITab(....). I have my application run over night and cycle MDI client title text labels. In the morning, I see memory start from 31MB to 90MB in Window Task Manager. If I disabled (Turn OFF) MDI client tab, I only see 31MB. So there are memory consumption some where in the MDI / MFC framework. I have 15 MDI clients windows during long test. In the application, the Application title and MDI client label text changes quite often. By tracking MFC framework, the title update trigger called into CMDIChildWndEx::OnSetText(LPCTSTR lpszText) which in turn called m_pMDIFrame->m_wndClientArea.UpdateTabs(TRUE); and m_Impl.OnSetText(lpszText).
By review the CMDIClientAreaWnd::UpdateTabs(BOOL bSetActiveTabVisible) function, the while loop simply go through all MDI client windows and updated tab icons and tab labels (window caption). If iTabIndex not available, then add new tab into m_wndTab.AddTab(...). So, my investigation by put a debug break point at line 1256: m_wndTab.AddTab(pWndChild, strTabLabel, iIcon); after all MDI client tab already created, however, in long marathon run, I didn't see the debug break. So, now I am thinking of MDI document framework is tracking tab and consumption memory in the MFC/Win32, somewhere that I can't pin point.
Turn MDI client tab OFF:
EnableMDITabs(false);
EnableMDITabbedGroups(false, params);
Turn MDI client tab ON:
EnableMDITabs(true, 0, CMFCBaseTabCtrl::LOCATION_BOTTOM, 1, CMFCTabCtrl::STYLE_3D_ONENOTE);
Thank You
Mike
Continue reading...