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() {
34
34
tracy::LuaRegister (m_State);
35
35
36
36
// 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);
38
39
39
40
const luaL_Reg libsToLoad[] = {
40
41
{LUA_COLIBNAME, luaopen_base},
@@ -1173,6 +1174,11 @@ void LuaMan::Update() {
1173
1174
void LuaMan::StartAsyncGarbageCollection () {
1174
1175
ZoneScoped;
1175
1176
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
+
1176
1182
std::vector<LuaStateWrapper*> allStates;
1177
1183
allStates.reserve (m_ScriptStates.size () + 1 );
1178
1184
You can’t perform that action at this time.
0 commit comments