chatgui: add shutdown diagnostics — ~DbManager, ~SoundManager, g_shutdown_sentinel

Three diagnostic points covering the gap between ~MainWindow done and CRT exit:
- DbManager: destroyed — confirms local dtors started after ~MainWindow
- SoundManager: static destructor entered — confirms static destruction phase
- main: static destructors done (g_shutdown_sentinel dtor) — confirms ALL statics done

If process hangs, we know exactly which phase failed.
This commit is contained in:
Evgeny committed 2026-07-24 14:34:00 +03:00
1 parent 0d558245ce
commit 74c6b0d102
3 files changed
+14 -2

No files matched your search

+2
View File
@@ -1,5 +1,6 @@
#include "db_manager.h"
#include "../src/debug_ui.h"
#include "../../lib/debug_config.h"
#include <openssl/sha.h>
#include <openssl/evp.h>
#include <cstring>
@@ -78,6 +79,7 @@ DbManager::~DbManager() {
for (auto it = m_cursors.begin(); it != m_cursors.end(); ++it)
sqlite3_finalize(it.value());
m_cursors.clear();
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "DbManager: destroyed");
}
sqlite3_stmt* DbManager::prepareOrNull(const char* sql) const {