From ad4ae6449221edbbe5fcec9c366b1748fea2ba17 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 16 Mar 2025 13:52:55 +0800 Subject: fix: use shared ptr properly FIXME: for some reason dtors arent called even if use_count() is 0... --- src/chatServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chatServer.cpp') diff --git a/src/chatServer.cpp b/src/chatServer.cpp index 8e9a3ab..8605c75 100644 --- a/src/chatServer.cpp +++ b/src/chatServer.cpp @@ -39,7 +39,7 @@ void CChatServer::start() { initManagers(); // will await while waiting for accept() to return a new client - m_sessionManagerThread = std::jthread(&CSessionManager::run, g_pSessionManager.get()); + m_sessionManagerThread = std::jthread(&CSessionManager::run, g_pSessionManager); m_sessionManagerThread.detach(); while (true) { -- cgit v1.2.3