Hi All,

I have a doubt regarding the list control Deleteitem() and DeleteAllItem()s.

If I call DeleteItem() or DeleteAllItems(), Is list control going to delete associated item that's set by SetItemData().

Consider the following the situation,


Myrec *myRec = new Myrec();
// do some caluclations and fill Myrec.
// Add to list control
LVITEM pItem;
pItem.iItem = count;//lCount-1;
pItem.iSubItem = 0;
pItem.mask = LVIF_TEXT | LVIF_PARAM;
pItem.pszText = myRec->Name;
myCtrl.InsertItem( &pItem );
myCtrl.SetItemText(count, 1,myRec->ID;
myCtrl.SetItemData(count,(LPARAM)myRec);

After some time If I call myCtrl.DeleteAllites(), Is it going to delete the associated item myRec pointer(in heap) along with each row in list control?

Or do I need to store all my qrec pointers in a separate list while adding to list control, and delete them explicitly????

Thanks and Regards,
Ramana