summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-04-27 23:58:25 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-04-27 23:58:25 +0800
commit3018e1e9f5ad76dfb787808ef2d57cb7826eca03 (patch)
treea52388fd5a0d26a2eb539782dcace1565fd88939
parent756abab0195c4f5f5513cc66ed6f1e71d5f8249e (diff)
downloadaptitude-3018e1e9f5ad76dfb787808ef2d57cb7826eca03.tar.gz
Destroy download_threads when done with them
-rw-r--r--src/ui_download_manager.cc4
-rw-r--r--src/ui_download_manager.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ui_download_manager.cc b/src/ui_download_manager.cc
index 366d45b8..ea1f9d17 100644
--- a/src/ui_download_manager.cc
+++ b/src/ui_download_manager.cc
@@ -49,8 +49,10 @@ ui_download_manager::~ui_download_manager()
delete st;
}
-void ui_download_manager::done(download_thread *, pkgAcquire::RunResult res)
+void ui_download_manager::done(download_thread *t, pkgAcquire::RunResult res)
{
+ delete t;
+
progress_with_destructor pair = make_progress_bar();
done_progress = pair.first;
done_progress_destructor = pair.second;
diff --git a/src/ui_download_manager.h b/src/ui_download_manager.h
index cd1deea0..18bb6231 100644
--- a/src/ui_download_manager.h
+++ b/src/ui_download_manager.h
@@ -183,7 +183,7 @@ class ui_download_manager : public sigc::trackable
*/
sigc::slot0<void> done_progress_destructor;
- void done(download_thread *, pkgAcquire::RunResult res);
+ void done(download_thread *t, pkgAcquire::RunResult res);
/** \brief Finishes the work of done() after the post-download
* actions of the download manager have run.