Multiple memory leaks fixed, and cache trash avoiding
- From: Philip Van Hoof <spam pvanhoof be>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Multiple memory leaks fixed, and cache trash avoiding
- Date: Wed, 24 Jan 2007 03:04:55 +0100
I fixed multiple leaks and reintroduced the hashtable of the summary
under a conditional situation.
In case camel_folder_summary_prepare_hash (s) happened, the hashtable
will be used until .. camel_folder_summary_kill_hash (s) happened.
I added these methods to the most relevant locations all over
camel-lite.
For example when saving (unmapping, dumping the summary to the
filesystem and reloading or remapping everything), the hashtable is used
because I know that this is a spot where a lot lookups by uid are going
to be needed.
All the by-uid lookup functions will also detect whether there's a
hashtable available or not, of course.
I guess this is the perfect tradeoff between not wanting to use too much
memory, yet not constantly trashing your cache either. Unless somebody
has a better idea?
--
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://www.pvanhoof.be/blog
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]