MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Uninitialize

Method Uninitialize

src/script/squirrel.cpp:723–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721}
722
723void Squirrel::Uninitialize()
724{
725 ScriptAllocatorScope alloc_scope(this);
726
727 /* Remove the delegation */
728 sq_pushroottable(this->vm);
729 sq_pushnull(this->vm);
730 sq_setdelegate(this->vm, -2);
731 sq_pop(this->vm, 1);
732
733 /* Clean up the stuff */
734 sq_pop(this->vm, 1);
735 sq_close(this->vm);
736
737 /* Reset memory allocation errors. */
738 this->allocator->Reset();
739}
740
741void Squirrel::Reset()
742{

Callers 2

~SquirrelMethod · 0.95
ResetMethod · 0.95

Calls 6

sq_pushroottableFunction · 0.85
sq_pushnullFunction · 0.85
sq_setdelegateFunction · 0.85
sq_popFunction · 0.85
sq_closeFunction · 0.85
ResetMethod · 0.45

Tested by

no test coverage detected