Re: Gio & memory management
- From: Nicola Fontana <ntd entidi it>
- To: gtk-app-devel-list gnome org
- Subject: Re: Gio & memory management
- Date: Tue, 14 Oct 2008 17:50:04 +0200
On Tue, 14 Oct 2008 17:41:13 +0200
Damien Caliste <damien caliste cea fr> wrote:
Hello,
Le 14/10/2008, nico <nico yojik eu> a écrit :
And here is the source code of the program:
http://yojik.shtooka.net/gio.c
I didn't run nor check extensively the program but maybe there is a
memory leak coming from the path you build with g_build_filename(). The
documentation states that the returned string must be free. And a quick
look to your source doesn't make this g_free() call appears to me...
http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-build-filename
So after the recursive call I would have put a g_free() there.
And you're also g_freeing a GFileInfo, which is a GObject. Try
to use g_object_unref() instead.
Ciao
--
Nicola
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]