Various memory leaks and fixes



Hi there,

When you deleted accounts (from GConf), Folders where not freed from the
memory. Yes I know it sounds crazy for a memory-geek like me, but they
really didn't.

The reason was that the original g_object_new and the
tny_msg_folder_iface_add_folder implementation of camel both referenced
child folders. Making their reference count two. The code assumed the
reference count was one. So one referencer was removed. As only one
keeps a real reference: the parent folder. There's no need for two
references once the folder is parented.

I also fixed various API mistakes that I now discover. I guess it's a
good practise to look at your code after not touching it for a few
weeks. You find all kinds of strange things.

I also, for example, removed the 3th "accounts" GList of the account
store. Now there's only transport_accounts and store_accounts. So
basically how you'd expect the implementation to be.

I'm still fighting my subscribe/unsubscribe API problems. I haven't
tested subscribing, unsubscribing and getting both a list of subscribed
and unsubscribed folders.

Unlike how it looks like Camel works, I really want to reuse the folder
instances when displaying information about subscribed and unsubscribed
folders. For example when a user wants an overview of all folders
(including the ones that he's not subscribed on). But that basically
means getting a new list of folders.

So I'm now thinking: Let's just always ask for *all* folders, and let's
make the folder tree model smart about only displaying the subscribed
ones (in case that is the setting which the view has set).

But then will people who have a lot unsubscribed folders be the dupe.
And that would make tinymail (therefore) less useful for NNTP (which
might work out of the box).


Let me know what you think .. if you have an opinion or solution.

-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be




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