MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _clear_stack

Method _clear_stack

modules/gdscript/gdscript_function.cpp:249–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void GDScriptFunctionState::_clear_stack() {
250 if (state.stack_size) {
251 Variant *stack = (Variant *)state.stack.ptr();
252 // First `GDScriptFunction::FIXED_ADDRESSES_MAX` stack addresses are special
253 // and not copied to the state, so we skip them here.
254 for (int i = GDScriptFunction::FIXED_ADDRESSES_MAX; i < state.stack_size; i++) {
255 stack[i].~Variant();
256 }
257 state.stack_size = 0;
258 }
259}
260
261void GDScriptFunctionState::_clear_connections() {
262 List<Object::Connection> conns;

Callers 2

~GDScriptInstanceMethod · 0.80

Calls 1

ptrMethod · 0.45

Tested by

no test coverage detected