MCPcopy Create free account
hub / github.com/DavidColson/Polybox / Close

Function Close

source/cpu.cpp:704–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

702// ***********************************************************************
703
704void Close() {
705 if (!pState->appLoaded) return;
706
707 lua_State* L = pState->pProgramState;
708 lua_getglobal(L, "close");
709 if (lua_isfunction(L, -1)) {
710 if (lua_pcall(L, 0, 0, 0) != LUA_OK) {
711 Log::Warn("Lua Runtime Error: %s", lua_tostring(L, lua_gettop(L)));
712 }
713 }
714
715#ifndef _RELEASE
716 u64 bytes = lua_totalbytes(L, 0);
717 Log::Info("Luau using %u bytes (%fkb %fmb) of memory", bytes, (f32)bytes/1024, (f32)bytes/1024/1024);
718#endif
719 lua_close(L);
720}
721
722String GetAppName() {
723 return pState->appName;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected