trick ardour to print main-thead mem-pool stats.
authorRobin Gareus <robin@gareus.org>
Fri, 11 Sep 2015 22:29:25 +0000 (00:29 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 12 Sep 2015 00:18:38 +0000 (02:18 +0200)
gtk2_ardour/ardour_ui.cc

index 0e160ce4d14581a79d93e71c09ae795458244a61..544fd54b3044f8fcab1ecb3b7fda9360d7e0c079 100644 (file)
@@ -646,6 +646,15 @@ ARDOUR_UI::~ARDOUR_UI ()
                delete gui_object_state;
                FastMeter::flush_pattern_cache ();
        }
+
+#ifndef NDEBUG
+       /* Small trick to flush main-thread event pool.
+        * Other thread-pools are destroyed at pthread_exit(),
+        * but tmain thread termination is too late to trigger Pool::~Pool()
+        */
+       SessionEvent* ev = new SessionEvent (SessionEvent::SetTransportSpeed, SessionEvent::Clear, SessionEvent::Immediate, 0, 0); // get the pool reference, values don't matter since the event is never queued.
+       delete ev->event_pool();
+#endif
 }
 
 void