Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPTabControl Memory Problem !!!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabControl Memory Problem !!!

 Post Reply Post Reply
Author
Message
shanmuganathan View Drop Down
Groupie
Groupie
Avatar

Joined: 01 December 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanmuganathan Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabControl Memory Problem !!!
    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.


Back to Top
shanmuganathan View Drop Down
Groupie
Groupie
Avatar

Joined: 01 December 2006
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanmuganathan Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2013 at 1:14am
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.




Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.