MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ReleaseStaticVarObjects

Function ReleaseStaticVarObjects

source/script.cpp:1469–1481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1467}
1468
1469void 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

Callers 1

TerminateAppMethod · 0.85

Calls 2

ReleaseVarObjectsFunction · 0.85
IsBuiltInMethod · 0.45

Tested by

no test coverage detected