Paul Davis
54597bd803
This also requires a change in the type of reference held by a MidiAutomationListBinder. Both the MidiSource and MidiModel have a reference to each other, and it is important that we avoid circular references to avoid problems with object destruction. We had been accomplishing this by having the Model hold a weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel are coincident and there's really no need to use a smart ptr at all. A normal reference is just fine. However, due to constructors that accept a serialized state, we cannot use an actual reference (we cannot set the constructor in the initializer list), so we use a bare ptr instead. This forces a similar change in MidiAutomationListBinder, which also maintains a reference to the Source. However, the only purpose of this object is to ensure that if the Source is destroyed, relevant commands will be removed from the undo/redo history, and so all that matters here is that the binder connects to the Destroyed signal of the source, and arranges for its own destruction when received. Note that the previous construction of the binder, actually holding a shared_ptr<MidiSource> would appear have prevented the Destroyed signal from ever being emitted (from ~Destructible), and so this may also be a bug fix that allows MidiSources to actually be deleted (the memory object, not the file). |
||
---|---|---|
doc | ||
gtk2_ardour | ||
headless | ||
libs | ||
luasession | ||
msvc_extra_headers | ||
MSVCardour3 | ||
MSVCMixbus3 | ||
MSVCvst_scan | ||
nutemp | ||
session_utils | ||
share | ||
tools | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ardour.1 | ||
COPYING | ||
instant.xml.sae | ||
msvc32-fixup.pl | ||
nutempo-todo | ||
PACKAGER_README | ||
README | ||
README-GITHUB.txt | ||
system_config | ||
testfile.flac | ||
testfile.ogg | ||
TRANSLATORS | ||
waf | ||
wscript |
Please see the Ardour web site at https://ardour.org/ for all documentation.. For information on building ardour: https://ardour.org/development.html