Fixed memory leaks in the tester and a symbol name flub in OS X's image.m.

This commit is contained in:
Pietro Gagliardi 2018-07-08 21:20:42 -04:00
parent 1700c0ccea
commit 095e63d522
4 changed files with 12 additions and 2 deletions

View File

@ -18,7 +18,7 @@ uiImage *uiNewImage(double width, double height)
return i;
}
void Image(uiImage *i)
void uiFreeImage(uiImage *i)
{
NSValue *v;

View File

@ -174,6 +174,7 @@ int main(int argc, char *argv[])
;
}
printf("after uiMain()\n");
freePage16();
uiUninit();
printf("after uiUninit()\n");
return 0;

View File

@ -98,10 +98,11 @@ static void modelSetCellValue(uiTableModelHandler *mh, uiTableModel *m, int row,
checkStates[row] = uiTableValueInt(val);
}
static uiTableModel *m;
uiBox *makePage16(void)
{
uiBox *page16;
uiTableModel *m;
uiTable *t;
uiTableParams p;
uiTableTextColumnOptionalParams tp;
@ -153,3 +154,10 @@ uiBox *makePage16(void)
return page16;
}
void freePage16(void)
{
uiFreeTableModel(m);
uiFreeImage(img[1]);
uiFreeImage(img[0]);
}

View File

@ -92,6 +92,7 @@ extern uiBox *makePage15(uiWindow *);
// page16.c
extern uiBox *makePage16(void);
extern void freePage16(void);
// images.c
extern void appendImageNamed(uiImage *img, const char *name);