Print Page | Close Window

[CLOSED] Big memory leak in CXtpReportControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16731
Printed Date: 23 November 2024 at 5:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [CLOSED] Big memory leak in CXtpReportControl
Posted By: xtpuser
Subject: [CLOSED] Big memory leak in CXtpReportControl
Date Posted: 20 May 2010 at 12:00pm
I am developing an application with XTreme Toolkitpro 2008 12.0.2,vs2005,XP SP3,here is the sample code:

class CMyMessageRecordItemText : public CXTPReportRecordItem
{
public:
     CMyMessageRecordItemText(COLORREF rgb,LPCTSTR szText);
};


CMyMessageRecordItemText::CMyMessageRecordItemText(COLORREF rgb,LPCTSTR szText)
{
     m_bFocusable=TRUE;
     m_clrBackground=rgb;
     m_strCaption=szText;
}


CXTPReportRecord *pRecord;
pRecord=new CXTPReportRecord();
pRecord->AddItem(new CMyMessageRecordItemIcon(Action));
pRecord->AddItem(new CMessageRecordItemText(RGB(255,255,255),CString);
pRecord->AddItem(new CMessageRecordItemText(RGB(255,255,255),CString);
pRecord->AddItem(new CMessageRecordItemText(RGB(255,255,255),CString);
pRecord->AddItem(new CMessageRecordItemText(RGB(255,255,255),CString);
pRecord->AddItem(new CMessageRecordItemText(RGB(255,255,255),CString);
m_ReportCtrl.AddRecord(pRecord);
m_ReportCtrl.Populate();

On startup mem usage is 13MB. After add 1000+ records my app fired up to 160MB memory usage........

memory not released until program ends,Pls tell me the solution asap,thanks!!!



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