debugging external LV2 GUI cleanup
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jun 2011 21:00:53 +0000 (21:00 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jun 2011 21:00:53 +0000 (21:00 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9723 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/lv2_plugin_ui.cc

index 330020ba93301a4491f8ce04c0236758f98e7884..e4a97bcabc4fb804947a4963aa37705bdb944742 100644 (file)
@@ -264,20 +264,26 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
 void
 LV2PluginUI::lv2ui_free()
 {
-       if (_lv2->is_external_ui() || !_gui_widget) {
-               return;
-       }
-
        stop_updating(NULL);
-       remove(*_gui_widget);
+
+       if (_gui_widget) {
+               remove (*_gui_widget);
+       }
 
 #ifdef HAVE_SUIL
+       cerr << "Calling suil_instance_free() to clean up "
+            << (_lv2->is_external_ui() ? " external " : " internal ")
+            << "UI\n";
        suil_instance_free((SuilInstance*)_inst);
 #else
        SLV2UIInstance          inst      = (SLV2UIInstance)_inst;
        const LV2UI_Descriptor* ui_desc   = slv2_ui_instance_get_descriptor(inst);
        LV2UI_Handle            ui_handle = slv2_ui_instance_get_handle(inst);
 
+       std::cerr << "Calling ui descriptor cleanup on " << ui_desc << " to clean up "
+                 << (_lv2->is_external_ui() ? " external " : " internal ")
+                 << "UI\n";
+
        if (ui_desc) {
                ui_desc->cleanup(ui_handle);
        }
@@ -289,7 +295,7 @@ LV2PluginUI::lv2ui_free()
 
 LV2PluginUI::~LV2PluginUI ()
 {
-       //cout << "LV2PluginUI destructor called" << endl;
+       std::cerr << "LV2PluginUI destructor called" << std::endl;
 
        if (_values) {
                delete[] _values;