Print Page | Close Window

Memory Leak Problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7145
Printed Date: 04 October 2024 at 5:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Memory Leak Problem
Posted By: sand1212
Subject: Memory Leak Problem
Date Posted: 16 May 2007 at 1:30am
Hi,
 
I added InternalRelease(), but when I close the app it occurs access violation.
 
Message :
Detected memory leaks!
Dumping objects ->
strcore.cpp(118) : {18397} normal block at 0x02F41C70, 34 bytes long.
 Data: <            u s > 01 00 00 00 0A 00 00 00 0A 00 00 00 75 00 73 00
C:\Documents and Settings\OnFoot\My Documents\Visual Studio 2005\Projects\EOEIS\MainFrm.cpp(975) : {18396} client block at 0x02F41A08, subtype 0, 556 bytes long.
a CXTPControlGallery object at $02F41A08, 556 bytes long
Object dump complete.
 
 
Soucrce Code:
 
CXTPRibbonTab* pTabHome = pRibbonBar->AddTab(IDS_TAB_HOME);
 
 CXTPControlGallery* pControlMethod = new CXTPControlGallery(); <== this line.
 CXTPRibbonGroup* pGroupStyles = pTabHome->AddGroup(ID_METHOD_SELECT_LIST);

 pControlMethod = (CXTPControlGallery*)pGroupStyles->Add(new CXTPControlGallery(), ID_METHOD_SELECT_LIST); 
 pControlMethod->SetControlSize(CSize(408, 60)); //235
 pControlMethod->SetItemsMargin(0, 1, 0, 1);
 pControlMethod->ShowLabels(FALSE);
 pControlMethod->ShowBorders(TRUE);
 pControlMethod->SetItems(m_pItemsStyles);

 CMenu menuQuickStyles;
 menuQuickStyles.LoadMenu(IDR_METHOD_SELECT);
 
 CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(GetCommandBars());
 pPopupBar->LoadMenu(menuQuickStyles.GetSubMenu(0));

 pControlMethod->SetCommandBar(pPopupBar);
 pPopupBar->EnableAnimation();
 pPopupBar->InternalRelease();




Replies:
Posted By: Oleg
Date Posted: 16 May 2007 at 5:52am

Change this line to

CXTPControlGallery* pControlMethod ;


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


Posted By: zhuhuaizhong
Date Posted: 11 November 2011 at 10:36am
I got the same msg  - "memory leaks" , but in the "Ribble Sample" , the "new CXTPControlGallery(); " works well ! . It' s amazing.



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