File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ void LuaStateWrapper::Initialize() {
3434 tracy::LuaRegister (m_State);
3535
3636 // Disable gc. We do this manually, so we can thread it to occur parallel with non-lua updates
37- lua_gc (m_State, LUA_GCSTOP, 0 );
37+ // Not doing this for now... see StartAsyncGarbageCollection()
38+ // lua_gc(m_State, LUA_GCSTOP, 0);
3839
3940 const luaL_Reg libsToLoad[] = {
4041 {LUA_COLIBNAME, luaopen_base},
@@ -1173,6 +1174,11 @@ void LuaMan::Update() {
11731174void LuaMan::StartAsyncGarbageCollection () {
11741175 ZoneScoped;
11751176
1177+ // For now we're not doing this... because it's slower than normal (blocking) GC collection during the update
1178+ // This is because Lua is trash and basically GCSTEP is meaningless and can cause memory leak runaway, whereas GCCOLLECT is ultra-expensive
1179+ // So for now we do normal GC collection :(
1180+ return ;
1181+
11761182 std::vector<LuaStateWrapper*> allStates;
11771183 allStates.reserve (m_ScriptStates.size () + 1 );
11781184
You can’t perform that action at this time.
0 commit comments