Skip to content

Commit

Permalink
WebUI: free resources of session after destructed
Browse files Browse the repository at this point in the history
  • Loading branch information
dyseg committed Oct 18, 2024
1 parent 8e941a0 commit c681ec4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/webui/webapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,15 +730,15 @@ void WebApplication::sessionStart()
m_currentSession = new WebSession(generateSid(), app());
m_sessions[m_currentSession->id()] = m_currentSession;

m_currentSession->registerAPIController(u"app"_s, new AppController(app(), this));
m_currentSession->registerAPIController(u"log"_s, new LogController(app(), this));
m_currentSession->registerAPIController(u"torrentcreator"_s, new TorrentCreatorController(m_torrentCreationManager, app(), this));
m_currentSession->registerAPIController(u"rss"_s, new RSSController(app(), this));
m_currentSession->registerAPIController(u"search"_s, new SearchController(app(), this));
m_currentSession->registerAPIController(u"torrents"_s, new TorrentsController(app(), this));
m_currentSession->registerAPIController(u"transfer"_s, new TransferController(app(), this));

auto *syncController = new SyncController(app(), this);
m_currentSession->registerAPIController(u"app"_s, new AppController(app(), m_currentSession));
m_currentSession->registerAPIController(u"log"_s, new LogController(app(), m_currentSession));
m_currentSession->registerAPIController(u"torrentcreator"_s, new TorrentCreatorController(m_torrentCreationManager, app(), m_currentSession));
m_currentSession->registerAPIController(u"rss"_s, new RSSController(app(), m_currentSession));
m_currentSession->registerAPIController(u"search"_s, new SearchController(app(), m_currentSession));
m_currentSession->registerAPIController(u"torrents"_s, new TorrentsController(app(), m_currentSession));
m_currentSession->registerAPIController(u"transfer"_s, new TransferController(app(), m_currentSession));

auto *syncController = new SyncController(app(), m_currentSession);
syncController->updateFreeDiskSpace(m_freeDiskSpaceChecker->lastResult());
connect(m_freeDiskSpaceChecker, &FreeDiskSpaceChecker::checked, syncController, &SyncController::updateFreeDiskSpace);
m_currentSession->registerAPIController(u"sync"_s, syncController);
Expand Down

0 comments on commit c681ec4

Please sign in to comment.