CXTPTabControl Memory Problem !!! |
Post Reply |
Author | |
shanmuganathan
Groupie Joined: 01 December 2006 Status: Offline Points: 49 |
Post Options
Thanks(0)
Posted: 06 July 2013 at 4:57am |
Created a SDI application with a XT Splitter control, in which we created a CHtmlView with tabs using "CXTPTabControl" to load the web pages. Step 1: Memory of my application increases whenever we create or add a new tab. Step 2: Close all the tabs except one tab. Problem: The memory of application just reduces only 40% compared to the previous memory state. Please let me know what i am doing wrong (or) what we need to do to bring the memory of my application to a same state even after closing all the tabs. ==================== CODE==================== void CMyBrowserTabView::OnCloseOtherTabs() { CXTPTabManagerItem* pItem = NULL; CXTPTabManagerItem* pCurrentItem = NULL; //m_XTPTabControl is object of CXTPTabControl if( m_XTPTabControl.GetSafeHwnd() ) { pCurrentItem = m_XTPTabControl.GetSelectedItem(); CXTPTabManagerItem* pItem = NULL; HWND hWnd = NULL; for(int iter = m_XTPTabControl.GetItemCount()-2; iter>=0; iter-- ) { pItem = m_XTPTabControl.GetItem(iter); if( pItem != pCurrentItem ) { CMYBrowserView *pView = NULL; pView = (CMYBrowserView*)CWnd::FromHandle(pItem->GetHandle()); if(pView) { pView->Stop(); pItem->Remove(); pView->SetTabItem(NULL); delete pView; pView = NULL; } } } } } ==================== Version Info=================== Xtreme ToolkitPro v15.0.2 Visual Studio 2008 Windows 8 OS Thanks In Advance. |
|
shanmuganathan
Groupie Joined: 01 December 2006 Status: Offline Points: 49 |
Post Options
Thanks(0)
|
And even in the version (Xtreme ToolkitPro v15.0.2) we use we can see lot of memory leaks are pointed out in the codejock classes. Just a simple technique from the below link can be used by others to figure out the same. http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=vs.80).aspx. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |