From 4bf7b001cfa746554139f5fadb853082ebddab1f Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sun, 2 Aug 2020 14:38:38 +0200 Subject: Print leaked controls before DEBUG_ASSERT This allows us to actually see the list of leaked controls even if DEBUG_ASSERTIONS_FATAL is enabled. --- src/mixxx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mixxx.cpp b/src/mixxx.cpp index 9021bc96db..d4bc6e4d12 100644 --- a/src/mixxx.cpp +++ b/src/mixxx.cpp @@ -811,7 +811,7 @@ void MixxxMainWindow::finalize() { { QList> leakedControls = ControlDoublePrivate::takeAllInstances(); - VERIFY_OR_DEBUG_ASSERT(leakedControls.isEmpty()) { + if (!leakedControls.isEmpty()) { qWarning() << "The following" << leakedControls.size() @@ -827,6 +827,7 @@ void MixxxMainWindow::finalize() { pCDP->deleteCreatorCO(); } } + DEBUG_ASSERT(!"Controls were leaked!"); } // Finally drop all shared pointers by exiting this scope } -- cgit v1.2.3