Re: [Evolution-hackers] Memory leak in camel-imap-message-cache.c



On Mon, 2008-01-14 at 11:45 +0100, Philip Van Hoof wrote:
> On Mon, 2008-01-14 at 16:02 +0530, Srinivasa Ragavan wrote:
> > Look at the free_part function being called at 
> > g_hash_table_foreach (cache->parts, free_part, cache);
> > 
> > It frees the key.
> 
> Aha. Okay thanks for the clarification.
> 
> I wonder, wouldn't it be better to use the standard infrastructure of
> GHashTable to clearup keys? The full version of the GHashTable's
> constructor has a callback function pointer parameter that'll be used
> for freeing up keys like this.
I think it needs to be done that way. But just a clean up work IMO.

> I of course also wonder howcome my memory analysis tool pointed me to
> this memory leak. Although it might be explained by one CamelMessage
> reference still being open when the exit(0) took place.
> 
I use totalview to analyze memory. I dont see that from it. May be at
some specific scenarios.

-Srini.


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