Philip Pemberton <classiccmp at philpem.me.uk> writes:
Mainly because I seem to be spending a lot of time
chasing
mismatched-free bugs in the algorithms. Thank $DEITY for Valgrind (and
a great big sarcastic "gee, *thanks guys*" to the GTK developers who
have obviously never heard of it, much less used it on their own
code...)
Have you read the glib documentation, specifically the "Running and
debugging GLib Applications"[1] section? Check what they have to say
about the G_SLICE and G_DEBUG environment variables and you frustration
with the GTK developers will probably decrease :)
Running with G_SLICE=always-malloc and G_DEBUG=gc-friendly will remove
most valgrind warnings from inside GTK. Remember that glib and GTk does
not free (at termination) structures and configuration data that are
useful during the full lifetime of the process so you'll probably want
to write a valgrind suppression file for
that.
http://live.gnome.org/Valgrind contains more information about GTK
and valgrind.
Regards,
--Frej
[1]
http://developer.gnome.org/glib/2.28/glib-running.html