comctl32/listview: Free column data on control destruction.

This commit is contained in:
Nikolay Sivov 2009-10-22 01:12:05 +04:00 committed by Alexandre Julliard
parent aaec03347d
commit 7301ec8aa8
1 changed files with 5 additions and 0 deletions

View File

@ -9634,6 +9634,8 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
*/ */
static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr) static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr)
{ {
INT i;
TRACE("()\n"); TRACE("()\n");
/* delete all items */ /* delete all items */
@ -9644,6 +9646,9 @@ static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr)
DPA_Destroy(infoPtr->hdpaItemIds); DPA_Destroy(infoPtr->hdpaItemIds);
DPA_Destroy(infoPtr->hdpaPosX); DPA_Destroy(infoPtr->hdpaPosX);
DPA_Destroy(infoPtr->hdpaPosY); DPA_Destroy(infoPtr->hdpaPosY);
/* columns */
for (i = 0; i < DPA_GetPtrCount(infoPtr->hdpaColumns); i++)
Free(DPA_GetPtr(infoPtr->hdpaColumns, i));
DPA_Destroy(infoPtr->hdpaColumns); DPA_Destroy(infoPtr->hdpaColumns);
ranges_destroy(infoPtr->selectionRanges); ranges_destroy(infoPtr->selectionRanges);