diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-10-16 04:18:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-10-16 04:18:08 +0800 |
commit | f620356a6fc4a13fa805370c5d768082ebfba856 (patch) | |
tree | 013f8da94bfa6d0ab30f4690e59780e7f132e780 /mail/component-factory.c | |
parent | 244694ee58bf5eec443dc26135fc78fb24bcbd57 (diff) | |
download | gsoc2013-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/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 5d47f42d31..52f249b840 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -627,8 +627,16 @@ unref_standard_folders (void) for (i = 0; i < sizeof (standard_folders) / sizeof (standard_folders[0]); i++) { if (standard_folders[i].folder) { CamelFolder *folder = *standard_folders[i].folder; - + *standard_folders[i].folder = NULL; + + if (CAMEL_OBJECT (folder)->ref_count == 1) + printf ("About to finalise folder %s\n", folder->full_name); + else + printf ("Folder %s still has %d extra ref%s on it\n", folder->full_name, + CAMEL_OBJECT (folder)->ref_count - 1, + CAMEL_OBJECT (folder)->ref_count - 1 == 1 ? "" : "s"); + camel_object_unref (CAMEL_OBJECT (folder)); } } @@ -782,15 +790,15 @@ static gboolean idle_quit (gpointer user_data) { mail_msg_wait_all(); - + if (e_list_length (folder_browser_factory_get_control_list ())) return TRUE; - + g_hash_table_foreach (storages_hash, free_storage, NULL); g_hash_table_destroy (storages_hash); - + gtk_main_quit (); - + return FALSE; } @@ -820,9 +828,11 @@ owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data) if (mail_config_get_empty_trash_on_exit ()) empty_trash (NULL, NULL, NULL); - + mail_msg_wait_all(); + mail_vfolder_shutdown (); + unref_standard_folders (); mail_importer_uninit (); |