summaryrefslogtreecommitdiff
path: root/src/sessionManager.cpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-03-16 13:52:55 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-03-20 23:45:01 +0800
commitad4ae6449221edbbe5fcec9c366b1748fea2ba17 (patch)
tree535a0955cfda2cba6286d31f5c3d1fdd881dc59f /src/sessionManager.cpp
parent36a1cfd61b8915e2a532ea5aa615bed9c2c0d24e (diff)
fix: use shared ptr properly
FIXME: for some reason dtors arent called even if use_count() is 0...
Diffstat (limited to 'src/sessionManager.cpp')
-rw-r--r--src/sessionManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sessionManager.cpp b/src/sessionManager.cpp
index 2a833e8..20f6820 100644
--- a/src/sessionManager.cpp
+++ b/src/sessionManager.cpp
@@ -28,7 +28,7 @@ CSessionManager::~CSessionManager() {
std::pair<std::jthread, std::shared_ptr<CSession>> *CSessionManager::newSession() {
std::shared_ptr session = std::make_shared<CSession>();
- const auto instance = &m_vSessions.emplace_back(std::jthread(&CSession::run, session.get()), session);
+ const auto instance = &m_vSessions.emplace_back(std::jthread(&CSession::run, session), session);
instance->second->setSelf(instance);
return instance;
}