Re: g_get_user_config_dir leaks memory ?

2007-03-27 Thread Carl Worth
On Mon, 26 Mar 2007 19:19:22 -0600, Hans Petter Jansson wrote: Also, the last time I checked, valgrind would only let you suppress messages about invalid accesses, not leaked memory. No, it definitely allows suppressions for leaked memory, via a Memcheck:Leak suppression entry. I've included an

Re: g_get_user_config_dir leaks memory ?

2007-03-27 Thread Hans Petter Jansson
On Tue, 2007-03-27 at 06:46 -0700, Carl Worth wrote: On Mon, 26 Mar 2007 19:19:22 -0600, Hans Petter Jansson wrote: Also, the last time I checked, valgrind would only let you suppress messages about invalid accesses, not leaked memory. No, it definitely allows suppressions for leaked

Re: g_get_user_config_dir leaks memory ?

2007-03-27 Thread Rúben Fonseca
On Tue, Mar 27, 2007 at 06:46:19AM -0700, Carl Worth wrote: On Mon, 26 Mar 2007 19:19:22 -0600, Hans Petter Jansson wrote: Also, the last time I checked, valgrind would only let you suppress messages about invalid accesses, not leaked memory. No, it definitely allows suppressions for

g_get_user_config_dir leaks memory ?

2007-03-26 Thread Rúben Fonseca
Hi to all! I'm developping a app with GLib. Recently I've tryied to remove all the memory leaks of the app, using valgrind with great success. However, there is still one small leak that I want to discuss with you. The funcion g_get_user_config_dir returns a const gchar *. In the docs it says

Re: g_get_user_config_dir leaks memory ?

2007-03-26 Thread Rúben Fonseca
On Mon, Mar 26, 2007 at 08:39:06PM +0100, Rúben Fonseca wrote: Hi to all! I'm developping a app with GLib. Recently I've tryied to remove all the memory leaks of the app, using valgrind with great success. However, there is still one small leak that I want to discuss with you. The

Re: g_get_user_config_dir leaks memory ?

2007-03-26 Thread Ross Burton
On Mon, 2007-03-26 at 20:40 +0100, Rúben Fonseca wrote: So my question is, is g_get_user_config_dir really leaking? Or it is just a Valgrind problem? Can I make it not to leak? Looking up entries in the password database (thats the getpwnam_r call) can potentially take a long time (say the

Re: g_get_user_config_dir leaks memory ?

2007-03-26 Thread Hans Petter Jansson
On Mon, 2007-03-26 at 20:57 +0100, Ross Burton wrote: On Mon, 2007-03-26 at 20:40 +0100, Rúben Fonseca wrote: So my question is, is g_get_user_config_dir really leaking? Or it is just a Valgrind problem? Can I make it not to leak? Looking up entries in the password database (thats the

Re: g_get_user_config_dir leaks memory ?

2007-03-26 Thread Havoc Pennington
Hans Petter Jansson wrote: If it's cached, shouldn't it still be reachable? valgrind has a (mostly useless) mode that shows reachable-but-not-freed blocks. Havoc ___ gtk-devel-list mailing list gtk-devel-list@gnome.org

Re: g_get_user_config_dir leaks memory ?

2007-03-26 Thread Hans Petter Jansson
On Mon, 2007-03-26 at 21:10 -0400, Havoc Pennington wrote: Hans Petter Jansson wrote: If it's cached, shouldn't it still be reachable? valgrind has a (mostly useless) mode that shows reachable-but-not-freed blocks. Yes, but then it says still reachable. This one says definitely lost.