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 /widgets/table/e-table-selection-model.c | |
parent | 79521efaeecfbaf717e465670fcd2724aea53578 (diff) | |
download | gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.gz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.bz2 gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.lz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.xz 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 'widgets/table/e-table-selection-model.c')
-rw-r--r-- | widgets/table/e-table-selection-model.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c index 76983106f6..2b8ec0fa99 100644 --- a/widgets/table/e-table-selection-model.c +++ b/widgets/table/e-table-selection-model.c @@ -52,16 +52,9 @@ save_to_hash(int model_row, gpointer closure) } static void -free_key(gpointer key, gpointer value, gpointer closure) -{ - g_free(key); -} - -static void free_hash(ETableSelectionModel *etsm) { if (etsm->hash) { - g_hash_table_foreach(etsm->hash, free_key, NULL); g_hash_table_destroy(etsm->hash); etsm->hash = NULL; } @@ -78,7 +71,10 @@ model_pre_change (ETableModel *etm, ETableSelectionModel *etsm) if (etsm->model && e_table_model_has_save_id (etsm->model)) { gint cursor_row; - etsm->hash = g_hash_table_new(g_str_hash, g_str_equal); + etsm->hash = g_hash_table_new_full( + g_str_hash, g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) NULL); e_selection_model_foreach(E_SELECTION_MODEL(etsm), save_to_hash, etsm); g_object_get(etsm, |