There is at least one known plugin that has a problem with this
(custom thread race condition) but it also crashes in other hosts:
http://www.drumgizmo.org/wiki/doku.php?id=bugs&do=showcaselink&showid=8&project=drumgizmo
tested to be working with various nedko, falktx and x42 plugins
LV2PluginUI* me = (LV2PluginUI*)controller;
me->_screen_update_connection.disconnect();
me->_external_ui_ptr = NULL;
+#if 1
+ suil_instance_free((SuilInstance*)me->_inst);
+ me->_inst = NULL;
+#endif
}
void
if (_external_ui_ptr) {
LV2_EXTERNAL_UI_HIDE(_external_ui_ptr);
- //slv2_ui_instance_get_descriptor(_inst)->cleanup(_inst);
- //_external_ui_ptr = NULL;
- //_screen_update_connection.disconnect();
+ _screen_update_connection.disconnect();
+ _external_ui_ptr = NULL;
+#if 1
+ suil_instance_free((SuilInstance*)_inst);
+ _inst = NULL;
+#endif
} else {
lv2ui_free();
}