I don't want to remove the string while the function is still running ... I want to remove it when the function is NOT running anymore. But for some functions you don't get a proper end.
Here's an example:
action myAction() {
STRING* fctName = str_create("action myAction()");
ediag_entering(fctName);
while (me) {
// do some stuff here
ediag(fctName, LEVEL_INFO, _str("my debug message"));
// do some stuff here
}
ediag_exiting(fctName);
}
In this case ediag_exiting is never called, because the action dies with its related entity.