summaryrefslogtreecommitdiff
path: root/gtk2_ardour/vca_master_strip.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-04-23 18:25:49 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:41 -0400
commitb4c43f08785b8b971d09a1f543415e81395f4231 (patch)
tree3faec7445335dc621eeecfcdc5208381d262e6dd /gtk2_ardour/vca_master_strip.cc
parentbe4e898996837f718627c34d62dd42e6825103b7 (diff)
improve clean-up of GUI VCA-related objects
Diffstat (limited to 'gtk2_ardour/vca_master_strip.cc')
-rw-r--r--gtk2_ardour/vca_master_strip.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc
index 2fb8ed745a..f10596e786 100644
--- a/gtk2_ardour/vca_master_strip.cc
+++ b/gtk2_ardour/vca_master_strip.cc
@@ -39,6 +39,8 @@ using namespace Gtk;
using namespace PBD;
using std::string;
+PBD::Signal1<void,VCAMasterStrip*> VCAMasterStrip::CatchDeletion;
+
VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
: AxisView (s)
, _vca (v)
@@ -139,6 +141,21 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
invalidator (*this),
boost::bind (&VCAMasterStrip::update_vca_display, this),
gui_context());
+
+
+ _vca->DropReferences.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::self_delete, this), gui_context());
+
+}
+
+VCAMasterStrip::~VCAMasterStrip ()
+{
+ CatchDeletion (this); /* EMIT SIGNAL */
+}
+
+void
+VCAMasterStrip::self_delete ()
+{
+ delete this;
}
void