Re: Gio & memory management
- From: nico <nico yojik eu>
- To: gtk-app-devel-list gnome org
- Subject: Re: Gio & memory management
- Date: Tue, 14 Oct 2008 17:57:56 +0200
Thank you, Damien,
Yes, the g_free(child_path); is needed.
Now I need only... 43.8 Mb instead of 44.1 Mb.
That's better... But I guess the main memory leak isn't here...
In fact, in the first program that I post to the mailing list I was
"building" the children filename by myself (with malloc, strcpy, strcat,
free).
Regards,
Nicolas
Damien Caliste 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.
Damien.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]