summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-03-30 15:18:43 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-03-30 15:18:43 +0000
commit14b0ca31bcb62e5b7e9e77634ef9cd2e8cf65800 (patch)
tree494bcf5351ff29d9981c22450863982b93a91a71 /libs/ardour
parent10c257039df399fc5a9c383434ee19abab6199ed (diff)
handle deletion of UI objects between the time that a callback is queued with the UI event loop and the execution of the callback (intrusive, big)
git-svn-id: svn://localhost/ardour2/branches/3.0@6807 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audio_diskstream.cc8
-rw-r--r--libs/ardour/audiosource.cc2
-rw-r--r--libs/ardour/rc_configuration.cc2
-rw-r--r--libs/ardour/session_process.cc1
-rw-r--r--libs/ardour/session_rtevents.cc2
5 files changed, 5 insertions, 10 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index bf3ac58848..c7194d7495 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -2076,9 +2076,7 @@ int
AudioDiskstream::remove_channel_from (boost::shared_ptr<ChannelList> c, uint32_t how_many)
{
while (how_many-- && !c->empty()) {
- // FIXME: crash (thread safe with RCU?)
- // memory leak, when disabled.... :(
- //delete c->back();
+ delete c->back();
c->pop_back();
interpolation.remove_channel_from ();
}
@@ -2324,9 +2322,7 @@ AudioDiskstream::ChannelInfo::ChannelInfo (nframes_t bufsize, nframes_t speed_si
AudioDiskstream::ChannelInfo::~ChannelInfo ()
{
- if (write_source) {
- write_source.reset ();
- }
+ write_source.reset ();
delete [] speed_buffer;
speed_buffer = 0;
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc
index 2657ba94ad..f3206412f8 100644
--- a/libs/ardour/audiosource.cc
+++ b/libs/ardour/audiosource.cc
@@ -159,7 +159,7 @@ AudioSource::peaks_ready (boost::function<void()> doThisWhenReady, Connection& c
*/
if (!(ret = _peaks_built)) {
- PeaksReady.connect (connect_here_if_not, doThisWhenReady, event_loop);
+ PeaksReady.connect (connect_here_if_not, MISSING_INVALIDATOR, doThisWhenReady, event_loop);
}
return ret;
diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc
index 4c9e35924a..d503fb3503 100644
--- a/libs/ardour/rc_configuration.cc
+++ b/libs/ardour/rc_configuration.cc
@@ -172,7 +172,7 @@ RCConfiguration::save_state()
const string rcfile = rcfile_path.to_string();
// this test seems bogus?
- if (rcfile.length()) {
+ if (!rcfile.empty()) {
XMLTree tree;
tree.set_root (&get_state());
if (!tree.write (rcfile.c_str())){
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 483a8f071a..834280de91 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -191,7 +191,6 @@ Session::silent_process_routes (nframes_t nframes, bool& need_butler)
void
Session::get_diskstream_statistics ()
{
- int dret;
float pworst = 1.0f;
float cworst = 1.0f;
diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc
index 5def97941f..2befe47c16 100644
--- a/libs/ardour/session_rtevents.cc
+++ b/libs/ardour/session_rtevents.cc
@@ -163,7 +163,7 @@ Session::process_rtop (SessionEvent* ev)
ev->rt_slot ();
if (ev->event_loop) {
- ev->event_loop->call_slot (boost::bind (ev->rt_return, ev));
+ ev->event_loop->call_slot (MISSING_INVALIDATOR, boost::bind (ev->rt_return, ev));
} else {
warning << string_compose ("programming error: %1", X_("Session RT event queued from thread without a UI - cleanup in RT thread!")) << endmsg;
ev->rt_return (ev);