Re: Memory leaks in using g_ptr_array_free() of GLib?
- From: Aleksander Morgado <gtk-list aleksander es>
- To: José Luis García Pallero <jgpallero gmail com>
- Cc: gtk-list gnome org
- Subject: Re: Memory leaks in using g_ptr_array_free() of GLib?
- Date: Sun, 11 Apr 2010 22:00:20 +0200
First of all, sorry if this is not the adecuate list to ask about
GLib, but I haven't found the list about GLib.
Yes, this is the proper list also for GLib related questions.
valgrind --leak-check=full ./memptr
In order to have some proper results with Valgrind, you always need to tell GLib not to use the slice-allocator implementation, and use standard g_malloc/g_free instead. You can do this setting G_SLICE to 'always-malloc' before calling your program:
$> export G_SLICE=always-malloc
$> valgrind --leak-check=full ./memptr
http://library.gnome.org/devel/glib/stable/glib-running.html
http://live.gnome.org/ValgrindCheers,
-Aleksander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]