Added a lifeline to keep my sanity about lifetimes. Not sure if this will stay or not...
This commit is contained in:
parent
335bfe8b1a
commit
8a10f90336
|
@ -24,6 +24,7 @@ baseHFILES = \
|
||||||
|
|
||||||
baseCFILES = \
|
baseCFILES = \
|
||||||
box.c \
|
box.c \
|
||||||
|
lifetimes.c \
|
||||||
$(osCFILES)
|
$(osCFILES)
|
||||||
|
|
||||||
baseMFILES = $(osMFILES)
|
baseMFILES = $(osMFILES)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
// 25 april 2015
|
||||||
|
#include "ui.h"
|
||||||
|
#include "uipriv.h"
|
||||||
|
|
||||||
|
// called by uiParentDestroy() and any container control in its uiControlDestroy()
|
||||||
|
void properlyDestroyControl(uiControl *c)
|
||||||
|
{
|
||||||
|
uiControlSetOSContainer(c, NULL);
|
||||||
|
uiControlSetHasParent(c, 0);
|
||||||
|
uiControlDestroy(c);
|
||||||
|
}
|
|
@ -9,3 +9,6 @@ extern void *uiRealloc(void *, size_t, const char *);
|
||||||
extern void uiFree(void *);
|
extern void uiFree(void *);
|
||||||
|
|
||||||
extern void complain(const char *, ...);
|
extern void complain(const char *, ...);
|
||||||
|
|
||||||
|
// lifetimes.c
|
||||||
|
extern void properlyDestroyControl(uiControl *);
|
||||||
|
|
Loading…
Reference in New Issue