CComboBox::SetItemDataPtr and cleaning memory
If I allocate memory for a combobox item and store the pointer with SetItemDataPtr, does DeleteString liberate the allocated space automatically or do I have to do it manually ? Same question when the CComboBox object is destroyed. I didn't find the answer in MSDN.
Re: CComboBox::SetItemDataPtr and cleaning memory
Combobox has no idea what kind of objects did you aloocated (if any) and how (in the heap, on the stack,...)
So it is up to you to cleanup by DeleteString and/or destroying control.
Re: CComboBox::SetItemDataPtr and cleaning memory
No, the control does not do any auto-clean-up. You must handle that manually.