| 1467 | } |
| 1468 | |
| 1469 | void ReleaseStaticVarObjects(FuncList &aFuncs) |
| 1470 | { |
| 1471 | for (int i = 0; i < aFuncs.mCount; ++i) |
| 1472 | { |
| 1473 | ASSERT(!aFuncs.mItem[i]->IsBuiltIn()); |
| 1474 | auto &f = *(UserFunc *)aFuncs.mItem[i]; |
| 1475 | // Since it doesn't seem feasible to release all var backups created by recursive function |
| 1476 | // calls and all tokens in the 'stack' of each currently executing expression, currently |
| 1477 | // only static and global variables are released. It seems best for consistency to also |
| 1478 | // avoid releasing top-level non-static local variables (i.e. which aren't in var backups). |
| 1479 | ReleaseVarObjects(f.mStaticVars); |
| 1480 | } |
| 1481 | } |
| 1482 | |
| 1483 | |
| 1484 |
no test coverage detected