From 8112d6472ecaf688a24572c397f2bfa4e1dd38a6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 13 Jan 2020 20:24:04 +0100 Subject: [PATCH] Drop references held by any GUI Lua script after execution --- gtk2_ardour/luainstance.cc | 2 +- gtk2_ardour/luawindow.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/luainstance.cc b/gtk2_ardour/luainstance.cc index 694d333da8..c08f28df8a 100644 --- a/gtk2_ardour/luainstance.cc +++ b/gtk2_ardour/luainstance.cc @@ -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 diff --git a/gtk2_ardour/luawindow.cc b/gtk2_ardour/luawindow.cc index ee1475cfaf..720dbaf48d 100644 --- a/gtk2_ardour/luawindow.cc +++ b/gtk2_ardour/luawindow.cc @@ -329,6 +329,7 @@ LuaWindow::run_script () append_text (string_compose (_("C++ Exception: %1"), "...")); } } + lua->collect_garbage (); } void