summaryrefslogtreecommitdiff
path: root/docs/faq
diff options
context:
space:
mode:
Diffstat (limited to 'docs/faq')
-rw-r--r--docs/faq/gtk-faq.sgml19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/faq/gtk-faq.sgml b/docs/faq/gtk-faq.sgml
index e986e4512c..1f9f9b2c41 100644
--- a/docs/faq/gtk-faq.sgml
+++ b/docs/faq/gtk-faq.sgml
@@ -2283,6 +2283,25 @@ distribution, in the file <filename>gtk/testdnd.c</filename>.</para>
</sect1>
+<!-- ----------------------------------------------------------------- -->
+
+<sect1>
+<title>Why does GTK+/GLib leak memory?</title>
+
+<para>It doesn't. Both GLib and the C library (malloc implementation)
+will cache allocated memory on occasion, even if you free it with
+free().</para>
+
+<para>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).</para>
+
+<para>In order to find memory leaks, use proper memory profiling
+tools.</para>
+
+</sect1>
+
</chapter>
<!-- ***************************************************************** -->