how can I trust glib when it has so many mem leaks ?
- From: Ionutz Borcoman <borco borco-ei eng hokudai ac jp>
- To: gtk <gtk-list redhat com>
- Subject: how can I trust glib when it has so many mem leaks ?
- Date: Wed, 17 Mar 1999 22:48:36 +0900
Hi,
This simple program:
#include <gtk/gtk.h>
void main()
{
GString *string = g_string_new(NULL);
g_string_free(string, FALSE);
}
produces this:
.---------------.
|ccmalloc report|
=======================================================
| total # of| allocated | deallocated | garbage |
+-----------+-------------+-------------+-------------+
| bytes| 2164 | 0 | 2164 |
+-----------+-------------+-------------+-------------+
|allocations| 6 | 0 | 6 |
+-----------------------------------------------------+
If I change the FALSE to TRUE, I get this:
.---------------.
|ccmalloc report|
=======================================================
| total # of| allocated | deallocated | garbage |
+-----------+-------------+-------------+-------------+
| bytes| 2164 | 4 | 2160 |
+-----------+-------------+-------------+-------------+
|allocations| 6 | 1 | 5 |
+-----------------------------------------------------+
In both cases, I get a lot of garbage :-(
How am I supposed to check memory leaks in my programs when they are
outmubered by those in glib ? GList also produces garbage. I have
understood that some glib is doing somemanagement. How can i know if
this memory is realy freed ?
TIA,
Ionutz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]