Drop references held by any GUI Lua script after execution
authorRobin Gareus <robin@gareus.org>
Mon, 13 Jan 2020 19:24:04 +0000 (20:24 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 13 Jan 2020 19:25:00 +0000 (20:25 +0100)
gtk2_ardour/luainstance.cc
gtk2_ardour/luawindow.cc

index 694d333da85b38739b9aa4b9a4d3fd12d27b5900..c08f28df8a5da41034cf5216c3a5aecb02dd3ef0 100644 (file)
@@ -1432,7 +1432,7 @@ LuaInstance::session_going_away ()
 
        lua_State* L = lua.getState();
        LuaBindings::set_session (L, _session);
-       lua.do_command ("collectgarbage();");
+       lua.collect_garbage ();
 }
 
 void
index ee1475cfaf011d45f60b2fd5d94fdfd36818f6f8..720dbaf48dd370a06a9f4f0137b9474f89a25036 100644 (file)
@@ -329,6 +329,7 @@ LuaWindow::run_script ()
                        append_text (string_compose (_("C++ Exception: %1"), "..."));
                }
        }
+       lua->collect_garbage ();
 }
 
 void