summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-07-18 23:34:12 +0200
committerRobin Gareus <robin@gareus.org>2016-07-18 23:52:40 +0200
commita450024c56a6a023a985adea4c542f9cc02dd6f3 (patch)
tree74e1b47fcceb06fa91910f198cb97eaaec1f55c5
parent520dcf8cdf0e6cf36210fa7826b63fe2c64ec218 (diff)
add some strategic lua gc steps.
-rw-r--r--gtk2_ardour/luainstance.cc1
-rw-r--r--gtk2_ardour/processor_box.cc1
2 files changed, 2 insertions, 0 deletions
diff --git a/gtk2_ardour/luainstance.cc b/gtk2_ardour/luainstance.cc
index fe91bb9562..ab9b012892 100644
--- a/gtk2_ardour/luainstance.cc
+++ b/gtk2_ardour/luainstance.cc
@@ -1147,6 +1147,7 @@ LuaInstance::call_action (const int id)
{
try {
(*_lua_call_action)(id + 1);
+ lua.collect_garbage_step ();
} catch (luabridge::LuaException const& e) {
cerr << "LuaException:" << e.what () << endl;
}
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 852acf230f..c01d9e497c 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -1723,6 +1723,7 @@ ProcessorEntry::LuaPluginDisplay::render_inline (cairo_t *cr, uint32_t width)
Cairo::Context ctx (cr);
try {
luabridge::LuaRef rv = (*_lua_render_inline)((Cairo::Context *)&ctx, width, _max_height);
+ lua_gui.collect_garbage_step ();
if (rv.isTable ()) {
uint32_t h = rv[2];
return h;