Re: Memory leaks in using g_ptr_array_free() of GLib?

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

 




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/Valgrind

Cheers,
-Aleksander


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux