GTK+ FAQ
<<< Previous | Development with GTK+: general questions | Next >>>

# Why does GTK+/GLib leak memory?

It doesn't. Both GLib and the C library (malloc implementation) will cache allocated memory on occasion, even if you free it with free().

So you can't generally use tools such as top to see if you are using free() properly (aside from the very roughest of estimations, i.e. if you are really, really screwing up top will show that, but you can't distinguish small mistakes from the GLib/malloc caches).

In order to find memory leaks, use proper memory profiling tools.

<<< Previous | Home | Next >>>
How do I do drag-and-drop? | Up | Development with GTK+: widget specific questions