add some strategic lua gc steps.

This commit is contained in:
Robin Gareus 2016-07-18 23:34:12 +02:00
parent 520dcf8cdf
commit a450024c56
2 changed files with 2 additions and 0 deletions

View 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;
}

View 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;