13
0

API and implementation tweaks for destroying VCAs

This commit is contained in:
Paul Davis 2016-04-29 11:07:27 -04:00
parent ba4464dc3c
commit 0ab10bf8e3
3 changed files with 4 additions and 5 deletions

View 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);

View 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

View 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>