From ce2294ee96c1bbf0b2c2aff9057cff333dcbd4f3 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 26 Dec 2008 13:39:11 +0000 Subject: [PATCH] - Made session deletion a bit faster - Fixed possible memory leak when folder scanning is enabled --- src/bittorrent.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 9abbf6e93..0ede943ff 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -87,14 +87,14 @@ bittorrent::~bittorrent() { saveSessionState(); saveFastResumeData(); // Set Session settings - /*session_settings ss; + session_settings ss; ss.tracker_receive_timeout = 1; ss.stop_tracker_timeout = 1; ss.tracker_completion_timeout = 1; ss.piece_timeout = 1; ss.peer_timeout = 1; ss.urlseed_timeout = 1; - s->set_settings(ss);*/ + s->set_settings(ss); // Disable directory scanning disableDirectoryScanning(); // Delete our objects @@ -104,6 +104,10 @@ bittorrent::~bittorrent() { if(filterParser) delete filterParser; delete downloader; + if(FSWatcher) { + delete FSWatcher; + delete FSMutex; + } // Delete BT session qDebug("Deleting session"); delete s;