Add configure test for garbage collector friendliness for GLib. If

2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, acconfig.h: Add configure test for garbage
	collector friendliness for GLib. If enabled, ENABLE_GC_FRIENDLY
	will be defined.

	* garray.c, ghash.c, glist.c, gmain.c, gmem.c, gnode.c, gqueue.c,
	gslist.c, gtree.c: If ENABLE_GC_FRIENDLY is defined, NULLify all
	memory released by the user, but cached by GLib. This lets a
	garbage collector have a more correct view of the actually used
	memory.
This commit is contained in:
Sebastian Wilhelmi
2000-04-17 13:23:27 +00:00
committed by Sebastian Wilhelmi
parent 03f9d485c1
commit 8c90d7766b
28 changed files with 379 additions and 32 deletions

View File

@@ -64,6 +64,11 @@ g_queue_free (GQueue *queue)
g_list_free (queue->head);
#ifdef ENABLE_GC_FRIENDLY
queue->head = NULL;
queue->tail = NULL;
#endif /* ENABLE_GC_FRIENDLY */
G_LOCK (queue_memchunk);
g_trash_stack_push (&free_queue_nodes, queue);
G_UNLOCK (queue_memchunk);