-
November 7th, 2010, 01:59 AM
#1
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.
-
November 7th, 2010, 04:13 AM
#2
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.
Victor Nijegorodov
-
November 8th, 2010, 08:30 AM
#3
Re: CComboBox::SetItemDataPtr and cleaning memory
No, the control does not do any auto-clean-up. You must handle that manually.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|