Stijn Steutel
April 19th, 1999, 07:00 AM
Hi,
I'm sorting a ListCtrl. I'm setting Item Data for the CALLBACK compare function like this:
CItemInfo *pItemInfo = new CItemInfo();
pItemInfo->SetLabel(strLabel);
m_ctlList.SetItemData(index, (LPARAM)pItemInfo);
This is working fine, but the debugger detects memory leaks when quitting the app. I think the pointers should be deleted, but I don't know how. When they are in scope, I can't delete them because the CALLBACK needs them. Is it possible to delete them when exiting? Or is there something else I should do?
Any help is appreciated,
Stijn
I'm sorting a ListCtrl. I'm setting Item Data for the CALLBACK compare function like this:
CItemInfo *pItemInfo = new CItemInfo();
pItemInfo->SetLabel(strLabel);
m_ctlList.SetItemData(index, (LPARAM)pItemInfo);
This is working fine, but the debugger detects memory leaks when quitting the app. I think the pointers should be deleted, but I don't know how. When they are in scope, I can't delete them because the CALLBACK needs them. Is it possible to delete them when exiting? Or is there something else I should do?
Any help is appreciated,
Stijn