MCPcopy Create free account
hub / github.com/anjo76/angelscript / DestroyVariables

Method DestroyVariables

sdk/angelscript/source/as_compiler.cpp:6238–6253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6236}
6237
6238void asCCompiler::DestroyVariables(asCByteCode *bc)
6239{
6240 // Call destructor on all variables except for the function parameters
6241 // Put the clean-up in a block to allow exception handler to understand this
6242 bc->Block(true);
6243 asCVariableScope *vs = variables;
6244 while( vs )
6245 {
6246 for( int n = (int)vs->variables.GetLength() - 1; n >= 0; n-- )
6247 if( vs->variables[n]->stackOffset > 0 )
6248 CallDestructor(vs->variables[n]->type, vs->variables[n]->stackOffset, vs->variables[n]->onHeap, bc);
6249
6250 vs = vs->parent;
6251 }
6252 bc->Block(false);
6253}
6254
6255void asCCompiler::AddVariableScope(bool isBreakScope, bool isContinueScope)
6256{

Callers

nothing calls this directly

Calls 2

BlockMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected