You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -923,16 +929,13 @@ int CLuaFileDefs::fileCloseGC(lua_State* luaVM)
923
929
924
930
if (!argStream.HasErrors())
925
931
{
926
-
// Close the file and delete it
927
-
pFile->Unload();
928
-
m_pElementDeleter->Delete(pFile);
929
-
930
932
// This file wasn't closed, so we should warn
931
933
// the scripter that they forgot to close it.
932
-
m_pScriptDebugging->LogWarning(luaVM, "Unclosed file (%s) was garbage collected. Check your resource for dereferenced files.", *pFile->GetFilePath());
933
-
// TODO: The debug info reported when Lua automatically garbage collects will
934
-
// actually be the exact point Lua pauses for collection. Find a way to
935
-
// remove the line number & script file completely.
934
+
m_pScriptDebugging->LogWarning(pFile->GetLuaDebugInfo(), "Unclosed file (%s) was garbage collected. Check your resource for dereferenced files.", *pFile->GetFilePath());
0 commit comments