From 73f967c330fcd2a81f4fa3db3d08a77a7c1b003b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 1 Apr 2015 10:58:56 -0400 Subject: delete tempo map at appropriate times --- libs/ardour/session.cc | 2 ++ libs/ardour/session_state.cc | 1 + 2 files changed, 3 insertions(+) (limited to 'libs') diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 7afeebb416..125b1b0ac5 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -576,6 +576,8 @@ Session::destroy () delete _midi_ports; _midi_ports = 0; delete _locations; _locations = 0; + delete _tempo_map; + DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n"); #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index ffebcaecb8..1efd68913a 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -237,6 +237,7 @@ Session::post_engine_init () try { /* tempo map requires sample rate knowledge */ + delete _tempo_map; _tempo_map = new TempoMap (_current_frame_rate); _tempo_map->PropertyChanged.connect_same_thread (*this, boost::bind (&Session::tempo_map_changed, this, _1)); -- cgit v1.2.3