aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-16 04:18:08 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-16 04:18:08 +0800
commitf620356a6fc4a13fa805370c5d768082ebfba856 (patch)
tree013f8da94bfa6d0ab30f4690e59780e7f132e780 /mail/mail-vfolder.c
parent244694ee58bf5eec443dc26135fc78fb24bcbd57 (diff)
downloadgsoc2013-evolution-f620356a6fc4a13fa805370c5d768082ebfba856.tar.gz
gsoc2013-evolution-f620356a6fc4a13fa805370c5d768082ebfba856.tar.zst
gsoc2013-evolution-f620356a6fc4a13fa805370c5d768082ebfba856.zip
Call mail_vfolder_shutdown.
2001-10-15 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (owner_unset_cb): Call mail_vfolder_shutdown. * mail-vfolder.c (mail_vfolder_shutdown): Unref all of our VFolders. * mail-folder-cache.c (real_note_folder): Remember to unref the folder before returning if we have already noted this folder. svn path=/trunk/; revision=13682
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 82ce02ea94..771190e31e 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -844,3 +844,28 @@ mail_vfolder_get_vfolder_storage (void)
{
return mail_lookup_storage(vfolder_store);
}
+
+
+static void
+vfolder_foreach_cb (gpointer key, gpointer data, gpointer user_data)
+{
+ CamelFolder *folder = CAMEL_FOLDER (data);
+
+ if (folder)
+ camel_object_unref (CAMEL_OBJECT (folder));
+
+ g_free (key);
+}
+
+void
+mail_vfolder_shutdown (void)
+{
+ g_hash_table_foreach (vfolder_hash, vfolder_foreach_cb, NULL);
+ g_hash_table_destroy (vfolder_hash);
+
+ if (vfolder_store)
+ camel_object_unref (CAMEL_OBJECT (vfolder_store));
+
+ if (context)
+ gtk_object_unref (GTK_OBJECT (context));
+}