DOC: CImageList Returned from CreateDragImage Needs Delete
Article ID: 155436
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 5.0 Learning Edition
This article was previously published under Q155436
SUMMARY
The CTreeCtrl::CreateDragImage and CListCtrl::CreateDragImage functions in
versions of MFC earlier than 4.2 return a pointer to a temporary CImageList
object. In MFC version 4.2, CreateDragImage returns a permanent object that
must be explicitly deleted.
The documentation for CreateDragImage does not state this.
This documentation error was fixed in Visual C++ version 5.0.
Additional query words: kbVC420bug leak kbImgLst
Keywords: kbbug kbdocerr kbdocfix kbfix kbuidesign kbvc500fix KB155436