Print Page | Close Window

Memory Leaks Issue for XTPToolBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13075
Printed Date: 01 July 2025 at 5:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Memory Leaks Issue for XTPToolBar
Posted By: amitb
Subject: Memory Leaks Issue for XTPToolBar
Date Posted: 06 January 2009 at 2:51am
uploads/20090106_025801_CJ-Memory-Leaks.zip - uploads/20090106_025801_CJ-Memory-Leaks.zip
I am facing some issues while resolving memory leaks:

Please see the attached file:

Some leaks i get are as follows:


C:\Program Files\Codejock Software\MFC\Xtreme ToolkitPro v12.1.1\Source\CommandBars\XTPToolBar.cpp(247) : {15315} normal block at 0x021A0940, 80 bytes long.
 Data: <ôŸ^ Øé      ÍÍÍÍ> F4 9F 5E 01 D8 E9 19 02 00 00 00 00 CD CD CD CD
C:\Program Files\Codejock Software\MFC\Xtreme ToolkitPro v12.1.1\Source\CommandBars\XTPCommandBar.cpp(200) : {15314} normal block at 0x021A08C8, 48 bytes long.
 Data: <Øé   âJ_        > D8 E9 19 02 88 E2 4A 5F 00 00 00 00 01 00 00 00
C:\Program Files\Codejock Software\MFC\Xtreme ToolkitPro v12.1.1\Source\CommandBars\XTPControls.cpp(51) : {15313} client block at 0x021A0840, subtype 0, 68 bytes long.
a CXTPControls object at $021A0840, 68 bytes long
strcore.cpp(118) : {15312} normal block at 0x021A0708, 23 bytes long.
 Data: <            user> 01 00 00 00 0A 00 00 00 0A 00 00 00 75 73 65 72
D:\Project\Source\PIM90\Pim\SplitWnd\CMCSplitMDIChildWnd.cpp(74) : {15311} client block at 0x0219E9D8, subtype 0, 432 bytes long.


In this when i click to the last line above (which is in my source code) , it leads me to the location :

IMPLEMENT_XTP_COMMANDBAR(CMVToolBarPrimViewName,TToolBar)
IMPLEMENT_XTP_COMMANDBAR(CMVToolBarDateRange,TToolBar)
IMPLEMENT_XTP_COMMANDBAR(CMVToolBarItemPicker,TToolBar)
IMPLEMENT_XTP_COMMANDBAR(CMVToolBarKeyWordSearch,TToolBar)


What could be the reason for this ?







Replies:
Posted By: Oleg
Date Posted: 06 January 2009 at 3:52am
Hi,
You forget free something. It can be reason.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: amitb
Date Posted: 06 January 2009 at 4:30am
The code is as follows :

m_pWndCalTB->m_combobox = (CXTPControlComboBox*)CXTPControlComboBox::CreateObject();

CXTPControlButton* pButtonFind = (CXTPControlButton*)CXTPControlButton::CreateObject();

CXTPControlComboBox* pComboFind = (CXTPControlComboBox*)CXTPControlComboBox::CreateObject();

How should i free this controls ????


Posted By: mdoubson
Date Posted: 06 January 2009 at 4:53pm
Why this discussion going in Calendar section? Is something special for Calendar control?


Posted By: prashant
Date Posted: 09 January 2009 at 1:23am
Hi Amit,

Found the way out...

Problem with two consecutive calls to InitCommandBars();

If you are calling InitCommandBars(); in main frame then no need to call it again in Child frame.

Cheers



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