summaryrefslogtreecommitdiff
path: root/docs/faq
diff options
context:
space:
mode:
authorGMT 2001 Tony Gale <gale@gtk.org>2001-02-27 13:38:33 +0000
committerTony Gale <gale@src.gnome.org>2001-02-27 13:38:33 +0000
commited6c14234c3e6c1f767de497d26d652c9aafa65f (patch)
tree19147f699cad272a644cac82906e483e764dc1da /docs/faq
parent5c28d2ca32e1d298ad2695935a79540ca31dda41 (diff)
downloadgtk+-ed6c14234c3e6c1f767de497d26d652c9aafa65f.tar.gz
New question re memory leaks.
Tue Feb 27 13:37:38 GMT 2001 Tony Gale <gale@gtk.org> * docs/faq/gtk-faq.sgml: New question re memory leaks.
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>
<!-- ***************************************************************** -->