[evolution-patches] giant folder thread leak fix.



This fixes the big leak that was making the mailer grow quickly.  An
alternate version is to destroy and recreate the memchunk store so that
it can actually shrink, I'll happily do that upon request.

--Larry

Index: camel-folder-thread.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder-thread.c,v
retrieving revision 1.17
diff -u -p -r1.17 camel-folder-thread.c
--- camel-folder-thread.c	27 Aug 2002 21:45:22 -0000	1.17
+++ camel-folder-thread.c	14 Jun 2003 06:12:36 -0000
@@ -662,6 +662,8 @@ camel_folder_thread_messages_apply(Camel
 			g_ptr_array_add(all, info);
 
 	g_hash_table_destroy(table);
+
+	e_memchunk_empty(thread->node_chunks);
 	thread_summary(thread, all);
 
 	g_ptr_array_free(thread->summary, TRUE);
@@ -777,7 +779,7 @@ camel_folder_thread_messages_add(CamelFo
 	/* reset the tree, and rebuild fully */
 	thread->tree = NULL;
 	e_memchunk_empty(thread->node_chunks);
-	thread_summary(thread, all, NULL);
+	thread_summary(thread, all);
 }
 
 static void
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1829
diff -u -p -r1.1829 ChangeLog
--- ChangeLog	13 Jun 2003 19:06:50 -0000	1.1829
+++ ChangeLog	14 Jun 2003 06:12:36 -0000
@@ -1,3 +1,9 @@
+2003-06-13  Larry Ewing  <lewing ximian com>
+
+	* camel-folder-thread.c (camel_folder_thread_messages_apply):
+	don't leak the summary when reloading it.  Fixes a very large
+	leak.
+
 2003-06-05  Jeffrey Stedfast  <fejj ximian com>
 
 	Fix for bug #40788.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]