rationalize destruction pathway (some more); tidy-ify some ImageFrame code
[ardour.git] / libs / ardour / session.cc
index 0bbd1834b4a46ee1adb6f8d01932a3002bdcfdb5..f0d69fec28087484a74965466b7668e843392265 100644 (file)
@@ -362,9 +362,7 @@ Session::destroy ()
 
        Stateful::loading_state_version = 0;
 
-       _butler->terminate_thread ();
        delete _butler;
-
        delete midi_control_ui;
 
        if (click_data != default_click) {
@@ -425,8 +423,9 @@ Session::destroy ()
                /* writer goes out of scope and updates master */
        }
        routes.flush ();
-       extern void boost_debug_count_ptrs ();
-       boost_debug_count_ptrs ();
+
+       boost::shared_ptr<RouteList> r = routes.reader ();
+       cerr << "\n\n\n AFTER ROUTE CLEARING, there are " << r->size() << " routes in RCU\n";
 
        DEBUG_TRACE (DEBUG::Destruction, "delete diskstreams\n");
        {