Re: [gnome-db] GdaDataModelRows leaking?



On Thu, Apr 3, 2008 at 4:35 PM, Murray Cumming <murrayc murrayc com> wrote:
>
> On Thu, 2008-04-03 at 16:00 +0200, Vivien Malerba wrote:
>  > On Thu, Apr 3, 2008 at 3:22 PM, Murray Cumming <murrayc murrayc com> wrote:
>  > > On Thu, 2008-04-03 at 14:11 +0200, Vivien Malerba wrote:
>  > >  > On Thu, Apr 3, 2008 at 11:31 AM, Murray Cumming <murrayc murrayc com> wrote:
>  > >  > > (This is in libgda-3.0. I haven't looked at this in trunk.)
>  > >  >
>  > >  > This only applies to V3, since for V4 the providers don't use that
>  > >  > object anymore (but the
>  > >  > global conception is almost the same).
>  > >  >
>  > >  > Each GdaDataModel implementation which inherits the GdaDataModelRow
>  > >  > class is repsonsible for managing its GdaRow objects, so the answer to
>  > >  > your question is no, don't unref() the GdaRow.
>  > >
>  > >  Thanks.
>  > >
>  > >  But the postgres provider really doesn't seem to be managing the rows
>  > >  that it creates. I think it's leaking the rows:
>  > >  http://svn.gnome.org/viewvc/libgda/branches/release-3-0-branch/providers/postgres/gda-postgres-recordset.c?view=markup
>  > >
>  >
>  > the get_row() always create a new GdaRow object, but (and I agree the
>  > names are badly chosen) the get_row vfunc is implemented by the
>  > gda_postgres_recordset_get_row() function which first checks that the
>  > requested GdaRow object does not already exist before calling
>  > get_row().
>  >
>  > I don't think there is any mem leak there (simply strangely and
>  > difficult to follow code)...
>
>  Ah, OK. Thanks. I do like code to have more comments.
>

Yep, I've tried to do that in V4...

>  I'll see if I can get the same valgrind leak report from a C test case
>  (I was using libgdamm).

Ok.


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