mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Fix memory leaks
* Fixes a couple of memory leaks (although not dangerous in practice, since we are talking about objects with a lifetime up to the end of the application) * Fixes heap use after free PR #19650. Closes #19632.
This commit is contained in:
committed by
GitHub
parent
cacae42e5e
commit
46c1c9de65
@@ -159,7 +159,7 @@ void TorrentFilesWatcher::initWorker()
|
||||
connect(m_asyncWorker, &TorrentFilesWatcher::Worker::torrentFound, this, &TorrentFilesWatcher::onTorrentFound);
|
||||
|
||||
m_asyncWorker->moveToThread(m_ioThread.get());
|
||||
connect(m_ioThread.get(), &QThread::finished, this, [this] { delete m_asyncWorker; });
|
||||
connect(m_ioThread.get(), &QObject::destroyed, this, [this] { delete m_asyncWorker; });
|
||||
m_ioThread->start();
|
||||
|
||||
for (auto it = m_watchedFolders.cbegin(); it != m_watchedFolders.cend(); ++it)
|
||||
|
||||
Reference in New Issue
Block a user