Implemented lifetime stuff on Windows Tab. Starting to wonder why I'm bothering, or if this is even working. Anyway now I can write uiTabDeletePage()...

This commit is contained in:
Pietro Gagliardi 2015-04-18 14:19:42 -04:00
parent efd94b2528
commit 492099f85a
1 changed files with 3 additions and 1 deletions

View File

@ -48,8 +48,10 @@ static BOOL onWM_NOTIFY(uiControl *c, NMHDR *nm, LRESULT *lResult)
static void onWM_DESTROY(uiControl *c)
{
struct tab *t = (struct tab *) c;
uintmax_t i;
// no need to worry about freeing the pages themselves; they'll destroy themselves after we return
for (i = 0; i < t->len; i++)
uiParentDestroy(t->pages[i]);
uiFree(t->pages);
uiFree(t);
}