diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-10-02 19:54:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-10-02 19:54:42 +0800 |
commit | 09d4af6fff63dd112b8bb42087f14f7018e2f78c (patch) | |
tree | 991537a9ea1d8487334f6fb299098daf425f9db8 /mail/em-format.c | |
parent | 79521efaeecfbaf717e465670fcd2724aea53578 (diff) | |
download | gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.gz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.zst gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.zip |
** Fixes bug #469657
2007-10-02 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #469657
* addressbook/importers/evolution-ldif-importer.c:
* calendar/gui/comp-editor-factory.c:
* composer/e-msg-composer.c:
* e-util/e-config-listener.c:
* mail/em-composer-prefs.c:
* mail/em-folder-tree-model.c:
* mail/em-format.c:
* mail/em-format-html.c:
* mail/em-migrate.c:
* mail/em-subscribe-editor.c:
* mail/mail-component.c:
* mail/mail-send-recv.c:
* mail/message-list.c:
* mail/importers/elm-importer.c:
* plugins/exchange-operations/exchange-folder-size-display.c:
* plugins/mono/mono-plugin.c:
* shell/e-shell-settings-dialog.c:
* tools/killev.c:
* widgets/table/e-table-extras.c:
* widgets/table/e-table-selection-model.c:
Use destroy functions in GHashTables to simplify memory management.
svn path=/trunk/; revision=34344
Diffstat (limited to 'mail/em-format.c')
-rw-r--r-- | mail/em-format.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mail/em-format.c b/mail/em-format.c index f22cc1a577..ce820cab11 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -91,10 +91,8 @@ static guint emf_signals[EMF_LAST_SIGNAL]; static GObjectClass *emf_parent; static void -emf_free_cache(void *key, void *val, void *dat) +emf_free_cache(struct _EMFormatCache *efc) { - struct _EMFormatCache *efc = val; - if (efc->valid) camel_cipher_validity_free(efc->valid); if (efc->secured) @@ -119,7 +117,10 @@ emf_init(GObject *o) { EMFormat *emf = (EMFormat *)o; - emf->inline_table = g_hash_table_new(g_str_hash, g_str_equal); + emf->inline_table = g_hash_table_new_full ( + g_str_hash, g_str_equal, + (GDestroyNotify) NULL, + (GDestroyNotify) emf_free_cache); emf->composer = FALSE; emf->show_photo = TRUE; emf->photo_local = TRUE; @@ -136,7 +137,6 @@ emf_finalise(GObject *o) if (emf->session) camel_object_unref(emf->session); - g_hash_table_foreach(emf->inline_table, emf_free_cache, NULL); g_hash_table_destroy(emf->inline_table); em_format_clear_headers(emf); @@ -642,9 +642,7 @@ emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeM em_format_clear_puri_tree(emf); if (emf != emfsource) { - g_hash_table_foreach(emf->inline_table, emf_free_cache, NULL); - g_hash_table_destroy(emf->inline_table); - emf->inline_table = g_hash_table_new(g_str_hash, g_str_equal); + g_hash_table_remove_all(emf->inline_table); if (emfsource) { struct _EMFormatHeader *h; |