Re: [gnome-db] V4: fix memory leaks
- From: Murray Cumming <murrayc murrayc com>
- To: Phil Longstaff <plongstaff rogers com>
- Cc: gnome-db-list gnome org, Vivien Malerba <vmalerba gmail com>
- Subject: Re: [gnome-db] V4: fix memory leaks
- Date: Tue, 20 May 2008 22:49:16 +0200
On Tue, 2008-05-20 at 16:14 -0400, Phil Longstaff wrote:
> Vivien Malerba wrote:
> > 2008/5/19 Phil Longstaff <plongstaff rogers com>:
> >> The attached patch fixes some memory leaks where string values returned via
> >> g_object_get() are not freed.
> >
> > They don't need to be freed because they will be in due time because
> > of the g_object_set_data_full ([...], g_free);
> >
> >> I found one of these using valgrind and the others by code inspection. I
> >> only looked at the main libgda directory, not at any providers (and I know
> >> there is at least 1 leak in the sqlite provider). Is there any plan to
> >> inspect or run valgrind on the v4 code?
> >
> > I don't have such plan myself (lack of time), but Murray Cummings is
> > doing some mem leaks tests with valgrind. However Libgda allocates
> > some memory which is not intended to be freed (such as static class
> > data), so you might get false positives there...
I would like to see some cleanup functions to match the gda_init()
function, to make it easier to do leak detection.
I hope patches for those would be accepted.
I'm not using libgda 4 yet much personally, though I do want to move to
it quite soon.
> OK. If a valgrind error suppressions file could be provided, that would
> be great. If not, maybe I'll start one. It'll just take me a while to
> find the static memory.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]