diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2009-05-04 12:10:18 +0800 |
---|---|---|
committer | Bharath Acharya <abharath@novell.com> | 2009-05-04 12:10:18 +0800 |
commit | fad86a267fd3c0ebc402ca67f14a0d2f74f57b74 (patch) | |
tree | 1920fde1a6ff82bcbcedffb85de9190dd3700b12 /mail | |
parent | 9aec0b31e5d2cd95b53e762dddf38a9982dd6217 (diff) | |
download | gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.tar gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.tar.gz gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.tar.bz2 gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.tar.lz gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.tar.xz gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.tar.zst gsoc2013-evolution-fad86a267fd3c0ebc402ca67f14a0d2f74f57b74.zip |
** BUGFIX: 569696 – Memory leak in message-list
Not exactly a leak, but a build-up over a period of time.
Clear the internal gnode on regen.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/message-list.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index 3027fcf3e8..68177535e2 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -2584,7 +2584,7 @@ clear_info(char *key, ETreePath *node, MessageList *ml) } static void -clear_tree (MessageList *ml) +clear_tree (MessageList *ml, gboolean tfree) { ETreeModel *etm = ml->model; @@ -2608,7 +2608,8 @@ clear_tree (MessageList *ml) } ml->tree_root = e_tree_memory_node_insert (E_TREE_MEMORY(etm), NULL, 0, NULL); - + if (tfree) + e_tree_model_rebuilt (E_TREE_MODEL(etm)); #ifdef TIMEIT gettimeofday(&end, NULL); diff = end.tv_sec * 1000 + end.tv_usec/1000; @@ -2769,7 +2770,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c selected = message_list_get_selected(ml); #endif e_tree_memory_freeze(E_TREE_MEMORY(etm)); - clear_tree (ml); + clear_tree (ml, FALSE); build_subtree(ml, ml->tree_root, thread->tree, &row); e_tree_memory_thaw(E_TREE_MEMORY(etm)); @@ -3088,7 +3089,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes) selected = message_list_get_selected(ml); #endif e_tree_memory_freeze(E_TREE_MEMORY(etm)); - clear_tree (ml); + clear_tree (ml, FALSE); for (i = 0; i < summary->len; i++) { ETreePath node; CamelMessageInfo *info = summary->pdata[i]; @@ -3354,7 +3355,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c } e_tree_memory_freeze(E_TREE_MEMORY(etm)); - clear_tree (message_list); + clear_tree (message_list, TRUE); e_tree_memory_thaw(E_TREE_MEMORY(etm)); if (message_list->folder) { |