Fixed a VIEW_ITEM memory leak

This commit is contained in:
Maciej Suminski 2017-01-12 15:41:00 +01:00
parent c50d28d94d
commit 9bc2bb2651
1 changed files with 4 additions and 0 deletions

View File

@ -360,6 +360,8 @@ void VIEW::Remove( VIEW_ITEM* aItem )
}
viewData->deleteGroups();
delete aItem->m_viewPrivData;
aItem->m_viewPrivData = nullptr;
}
@ -906,12 +908,14 @@ void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate )
}
}
void VIEW::draw( VIEW_GROUP* aGroup, bool aImmediate )
{
for( unsigned int i = 0; i < aGroup->GetSize(); i++)
draw( aGroup->GetItem(i), aImmediate );
}
struct VIEW::unlinkItem
{
bool operator()( VIEW_ITEM* aItem )