From dc3ebc8eecb2b7d3835de699bc993e9f7d25c514 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 20 May 2016 17:24:04 -0400 Subject: use (possibly null) macros to mark VCAs for boost shared ptr debugging --- libs/ardour/vca_manager.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/ardour/vca_manager.cc') diff --git a/libs/ardour/vca_manager.cc b/libs/ardour/vca_manager.cc index a6d9d2bc6f..080001af2a 100644 --- a/libs/ardour/vca_manager.cc +++ b/libs/ardour/vca_manager.cc @@ -21,6 +21,7 @@ #include "pbd/error.h" #include "pbd/replace_all.h" +#include "ardour/boost_debug.h" #include "ardour/slavable.h" #include "ardour/vca.h" #include "ardour/vca_manager.h" @@ -81,6 +82,7 @@ VCAManager::create_vca (uint32_t howmany, std::string const & name_template) } boost::shared_ptr vca = boost::shared_ptr (new VCA (_session, num, name)); + BOOST_MARK_VCA (vca); vca->init (); @@ -106,6 +108,7 @@ VCAManager::remove_vca (boost::shared_ptr vca) /* this should cause deassignment and deletion */ vca->DropReferences (); + std::cerr << "After DR, uc = " << vca.use_count() << std::endl; } boost::shared_ptr @@ -153,6 +156,7 @@ VCAManager::set_state (XMLNode const& node, int version) for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) { if ((*i)->name() == VCA::xml_node_name) { boost::shared_ptr vca = boost::shared_ptr (new VCA (_session, 0, X_("tobereset"))); + BOOST_MARK_VCA (vca); if (vca->init() || vca->set_state (**i, version)) { error << _("Cannot set state of a VCA") << endmsg; -- cgit v1.2.3