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!!!
|