1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 15:09:43 +00:00

Do several passes of garbage collecting in LuaManager::clear()

This commit is contained in:
Petr Mikheev 2023-01-31 07:57:12 +00:00
parent 3a986d9a51
commit c4e8d38e30

View file

@ -313,6 +313,8 @@ namespace MWLua
}
mGlobalStorage.clearTemporaryAndRemoveCallbacks();
mPlayerStorage.clearTemporaryAndRemoveCallbacks();
for (int i = 0; i < 5; ++i)
lua_gc(mLua.sol(), LUA_GCCOLLECT, 0);
}
void LuaManager::setupPlayer(const MWWorld::Ptr& ptr)