added some experimental code to support object finalization
This commit is contained in:
@ -163,6 +163,7 @@ oops:
|
||||
static moo_pfrc_t pf_close_display (moo_t* moo, moo_ooi_t nargs)
|
||||
{
|
||||
oop_x11_t x11;
|
||||
x11_trailer_t* tr;
|
||||
|
||||
// TODO: CHECK if the receiver is an X11 object
|
||||
|
||||
@ -174,6 +175,14 @@ static moo_pfrc_t pf_close_display (moo_t* moo, moo_ooi_t nargs)
|
||||
x11->display = moo->_nil;
|
||||
}
|
||||
|
||||
|
||||
tr = moo_getobjtrailer (moo, MOO_STACK_GETRCV(moo,nargs), MOO_NULL);
|
||||
if (tr->event)
|
||||
{
|
||||
moo_freemem (moo, tr->event);
|
||||
tr->event = MOO_NULL;
|
||||
}
|
||||
|
||||
MOO_STACK_SETRETTORCV (moo, nargs);
|
||||
return MOO_PF_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user