add some strategic lua gc steps.
authorRobin Gareus <robin@gareus.org>
Mon, 18 Jul 2016 21:34:12 +0000 (23:34 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 18 Jul 2016 21:52:40 +0000 (23:52 +0200)
gtk2_ardour/luainstance.cc
gtk2_ardour/processor_box.cc

index fe91bb95620e2ab8ff99722396c8106f5447cccd..ab9b0128923e28b472c7e624f7463847f0c85674 100644 (file)
@@ -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;
        }
index 852acf230f1de0323bf61909ccf2c3005aeb7041..c01d9e497cc976551a2ae5652f86d7e9e4b29224 100644 (file)
@@ -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;