Fixed memory leaks in the tester and a symbol name flub in OS X's image.m.
This commit is contained in:
parent
1700c0ccea
commit
095e63d522
|
@ -18,7 +18,7 @@ uiImage *uiNewImage(double width, double height)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Image(uiImage *i)
|
void uiFreeImage(uiImage *i)
|
||||||
{
|
{
|
||||||
NSValue *v;
|
NSValue *v;
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,7 @@ int main(int argc, char *argv[])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
printf("after uiMain()\n");
|
printf("after uiMain()\n");
|
||||||
|
freePage16();
|
||||||
uiUninit();
|
uiUninit();
|
||||||
printf("after uiUninit()\n");
|
printf("after uiUninit()\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -98,10 +98,11 @@ static void modelSetCellValue(uiTableModelHandler *mh, uiTableModel *m, int row,
|
||||||
checkStates[row] = uiTableValueInt(val);
|
checkStates[row] = uiTableValueInt(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uiTableModel *m;
|
||||||
|
|
||||||
uiBox *makePage16(void)
|
uiBox *makePage16(void)
|
||||||
{
|
{
|
||||||
uiBox *page16;
|
uiBox *page16;
|
||||||
uiTableModel *m;
|
|
||||||
uiTable *t;
|
uiTable *t;
|
||||||
uiTableParams p;
|
uiTableParams p;
|
||||||
uiTableTextColumnOptionalParams tp;
|
uiTableTextColumnOptionalParams tp;
|
||||||
|
@ -153,3 +154,10 @@ uiBox *makePage16(void)
|
||||||
|
|
||||||
return page16;
|
return page16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void freePage16(void)
|
||||||
|
{
|
||||||
|
uiFreeTableModel(m);
|
||||||
|
uiFreeImage(img[1]);
|
||||||
|
uiFreeImage(img[0]);
|
||||||
|
}
|
||||||
|
|
|
@ -92,6 +92,7 @@ extern uiBox *makePage15(uiWindow *);
|
||||||
|
|
||||||
// page16.c
|
// page16.c
|
||||||
extern uiBox *makePage16(void);
|
extern uiBox *makePage16(void);
|
||||||
|
extern void freePage16(void);
|
||||||
|
|
||||||
// images.c
|
// images.c
|
||||||
extern void appendImageNamed(uiImage *img, const char *name);
|
extern void appendImageNamed(uiImage *img, const char *name);
|
||||||
|
|
Loading…
Reference in New Issue