13
0

stop leakage of Crossfades caused by CrossfadeView's being left dangling when AudioStreamView is deleted

git-svn-id: svn://localhost/ardour2/branches/3.0@10318 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-10-27 21:01:46 +00:00
parent b02ebd72a5
commit f2ba861f05

View File

@ -70,6 +70,9 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
AudioStreamView::~AudioStreamView ()
{
for (CrossfadeViewList::iterator xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) {
delete xi->second;
}
}
int
@ -334,6 +337,7 @@ AudioStreamView::add_crossfade (boost::weak_ptr<Crossfade> wc)
*lview, *rview);
cv->set_valid (true);
crossfade->Invalidated.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::remove_crossfade, this, _1), gui_context());
crossfade->DropReferences.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::remove_crossfade, this, crossfade), gui_context());
crossfade_views[cv->crossfade] = cv;
if (!crossfades_visible) {
cv->hide ();