API and implementation tweaks for destroying VCAs
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 29 Apr 2016 15:07:27 +0000 (11:07 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:42 +0000 (15:30 -0400)
libs/ardour/ardour/vca_manager.h
libs/ardour/vca.cc
libs/ardour/vca_manager.cc

index 5102d14698fd1a4643fbffb90b96cbf474cac71f..c23c322fed9c785face3faf521eaa76780360943 100644 (file)
@@ -51,7 +51,6 @@ class VCAManager : public SessionHandleRef, public PBD::StatefulDestructible
        VCAList vcas() const;
 
        PBD::Signal1<void,VCAList&> VCAAdded;
-       PBD::Signal1<void,VCAList&> VCARemoved;
 
        XMLNode& get_state();
        int set_state (XMLNode const&, int version);
index 8227bf87494c477f1f40146f03e552432987f4ef..3310c924cb4b14e181c5ddf49320861c6d4975cd 100644 (file)
@@ -19,6 +19,7 @@
 #include "pbd/convert.h"
 
 #include "ardour/automation_control.h"
+#include "ardour/debug.h"
 #include "ardour/gain_control.h"
 #include "ardour/monitor_control.h"
 #include "ardour/rc_configuration.h"
@@ -89,7 +90,7 @@ VCA::init ()
 
 VCA::~VCA ()
 {
-       DropReferences (); /* emit signal */
+       DEBUG_TRACE (DEBUG::Destruction, string_compose ("delete VCA %1\n", number()));
 }
 
 uint32_t
index e6143ea0b2c1eb3e30967a44993b845ef6b6a315..a6d9d2bc6f438bebb3d88f4ccf93991190a0deb3 100644 (file)
@@ -103,10 +103,9 @@ VCAManager::remove_vca (boost::shared_ptr<VCA> vca)
                _vcas.remove (vca);
        }
 
-       VCAList vcal;
-       vcal.push_back (vca);
+       /* this should cause deassignment and deletion */
 
-       VCARemoved (vcal); /* EMIT SIGNAL */
+       vca->DropReferences ();
 }
 
 boost::shared_ptr<VCA>