In this code when my action is finished, it never reaches pan_remove in my function. Generally, how do I make sure object created in subfunction is removed when the action completes?
action my_action()
{
my_function();
while (...)
{
...
wait(1);
}
}
function my_function()
{
PANEL* pan = pan_create(...);
while (me != NULL)
{
...
wait(1);
}
pan_remove(pan);
}