do not delete GtkUIManager-generated menu from ProcessorBox when the PB is destroyed...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 15 Dec 2011 02:19:21 +0000 (02:19 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 15 Dec 2011 02:19:21 +0000 (02:19 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11008 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/processor_box.cc

index 7ad56cced370e3591fb9346cb98d4f9c62d80ce3..3040061dc9b8a18cd842017e170f97742aa87017 100644 (file)
@@ -505,7 +505,15 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
 
 ProcessorBox::~ProcessorBox ()
 {
-       delete processor_menu;
+       /* it may appear as if we should delete processor_menu but that is a
+        * pointer to a widget owned by the UI Manager, and has potentially
+        * be returned to many other ProcessorBoxes. GTK doesn't really make
+        * clear the ownership of this widget, which is a menu and thus is
+        * never packed into any container other than an implict GtkWindow.
+        *
+        * For now, until or if we ever get clarification over the ownership
+        * story just let it continue to exist. At worst, its a small memory leak.
+        */
 }
 
 void