aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-mail.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-12 03:08:53 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-12 03:08:53 +0800
commit76d4c1fa56ec4c02d68ad39ac847890936a4c098 (patch)
treeb3f2f7881d6bd7a97ea4dd11d47e8b1fbfbeb835 /my-evolution/e-summary-mail.c
parent127cae25a2bcb06343cda67831bcbb851cd56dad (diff)
downloadgsoc2013-evolution-76d4c1fa56ec4c02d68ad39ac847890936a4c098.tar.gz
gsoc2013-evolution-76d4c1fa56ec4c02d68ad39ac847890936a4c098.tar.zst
gsoc2013-evolution-76d4c1fa56ec4c02d68ad39ac847890936a4c098.zip
Free the data stop all the transfers when the summary is destroyed.
svn path=/trunk/; revision=11010
Diffstat (limited to 'my-evolution/e-summary-mail.c')
-rw-r--r--my-evolution/e-summary-mail.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index bf00686f1e..1cd3a1ec16 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -440,3 +440,36 @@ e_summary_mail_uri_to_name (ESummary *summary,
}
}
+static void
+free_folder (gpointer key,
+ gpointer value,
+ gpointer data)
+{
+ ESummaryMailFolder *folder = value;
+
+ g_free (folder->name);
+ g_free (folder->path);
+ g_free (folder);
+ g_free (value);
+}
+
+void
+e_summary_mail_free (ESummary *summary)
+{
+ ESummaryMail *mail;
+
+ g_return_if_fail (summary != NULL);
+ g_return_if_fail (IS_E_SUMMARY (summary));
+
+ mail = summary->mail;
+ bonobo_object_release_unref (mail->folder_info, NULL);
+ bonobo_object_unref (BONOBO_OBJECT (mail->listener));
+
+ g_hash_table_foreach (mail->folders, free_folder, NULL);
+ g_hash_table_destroy (mail->folders);
+
+ g_free (mail->html);
+
+ g_free (mail);
+ summary->mail = NULL;
+}