Print Page | Close Window

CXTTabView Destructor Heap Corruption

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=17368
Printed Date: 24 May 2024 at 12:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTTabView Destructor Heap Corruption
Posted By: tommyvee
Subject: CXTTabView Destructor Heap Corruption
Date Posted: 04 October 2010 at 1:04am
I have an application with CXTTabView that pops up a window with a "Heap corruption" warning while working through the windows functions after calling the CXTTabView destructor, when exiting from the application.

This error occurs in wincore.cpp  at line 1033 (Visual Studio 2010 on W7), which is the line
bResult = ::DestroyWindow(m_hWnd) 
below. At this time, the debugger gives ??? for m_hWnd and for m_pCtrlSite.


Here is a cut and paste from wincore.cpp showing where the error occurs.

 #ifdef _AFX_NO_OCC_SUPPORT
if (m_hWnd != NULL)
bResult = ::DestroyWindow(m_hWnd);
#else //_AFX_NO_OCC_SUPPORT
if ((m_hWnd != NULL) || (m_pCtrlSite != NULL))
{
if (m_pCtrlSite == NULL)
bResult = ::DestroyWindow(m_hWnd);
else
bResult = m_pCtrlSite->DestroyControl();
}
#endif //_AFX_NO_OCC_SUPPORT

Does anyone have an idea of what might be causing this?
Ideas about how to do additional debugging are also welcome.

Thanks,
Tom



Replies:
Posted By: tommyvee
Date Posted: 05 October 2010 at 7:48pm
I did more testing and the heap corruption occurs when I attach a CTreeView-derived class to a CXTPDockingPane pane, so I will start a new topic in the DockingPane forum asking what about attaching a view might cause heap corruption.
Thanks in advance for any suggestions,
Tom



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net