diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-25 21:25:10 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-25 21:45:07 +0100 |
commit | 9e6435ff145ed7c99312e0d51d9dd23a1a8c3997 (patch) | |
tree | 1266a41d217b3afa2273161470069e9a62306b14 /libs/ardour/source_factory.cc | |
parent | aa3f7f24147fe0857ed4f0b08a3da4e08a0f7e3e (diff) |
Fix mem-leak, Playlist/Region SessionHandleRef
When a playlist is deleted and drops_references(), any
undo/redo StatefulDiffCommand referncing playlist invoke
Destructible::drop_references() of the Command.
This leads to command_death(). As opposed to UndoTransaction::clear()
the StatefulDiffCommand was not destroyed.
In case of playlists StatefulDiffCommand::_changes contains
PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > >
and shared pointer reference of the playlist regions were kept
indefinitely.
This fixes the following scenario:
New session, import an file, delete the created track,
clean up unused sources (delete unused playlists)[, quit].
A reference to the imported region was kept, because of the
playlist's undo command (insert region). Yet the source file
was deleted.
PS. Most playlist changes are accompanied by GUI zoom/selection
MementoCommands. Those are currently never directly dropped.
command_death() leaves those in place.
Diffstat (limited to 'libs/ardour/source_factory.cc')
0 files changed, 0 insertions, 0 deletions