Destroying the List Control

If you embed your CListCtrl object as a data member of a view or dialog class, it is destroyed when its owner is destroyed. If you use a CListView, the framework destroys the control when it destroys the view.

If you arrange for some of your list data to be stored in the application rather than the list control, you will need to arrange for its deallocation. For more information, see Callback Items and the Callback Mask in the Windows SDK.

In addition, you are responsible for deallocating any image lists you created and associated with the list control object.

See Also

Reference

Using CListCtrl

Concepts

Controls (MFC)