diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-03-16 13:52:55 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-03-20 23:45:01 +0800 |
| commit | ad4ae6449221edbbe5fcec9c366b1748fea2ba17 (patch) | |
| tree | 535a0955cfda2cba6286d31f5c3d1fdd881dc59f /src/sessionManager.cpp | |
| parent | 36a1cfd61b8915e2a532ea5aa615bed9c2c0d24e (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.cpp | 2 |
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; } |
