+Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmain.c (g_main_context_unref_and_unlock):
+ When DISABLE_MEM_POOLS is set, loop through and free
+ the poll records explicitely, since g_mem_chunk_destroy()
+ won't do it. (#118121, Morten Welinder)
+
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added "is" to ALL_LINGUAS.
+Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmain.c (g_main_context_unref_and_unlock):
+ When DISABLE_MEM_POOLS is set, loop through and free
+ the poll records explicitely, since g_mem_chunk_destroy()
+ won't do it. (#118121, Morten Welinder)
+
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added "is" to ALL_LINGUAS.
+Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmain.c (g_main_context_unref_and_unlock):
+ When DISABLE_MEM_POOLS is set, loop through and free
+ the poll records explicitely, since g_mem_chunk_destroy()
+ won't do it. (#118121, Morten Welinder)
+
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added "is" to ALL_LINGUAS.
+Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmain.c (g_main_context_unref_and_unlock):
+ When DISABLE_MEM_POOLS is set, loop through and free
+ the poll records explicitely, since g_mem_chunk_destroy()
+ won't do it. (#118121, Morten Welinder)
+
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added "is" to ALL_LINGUAS.
+Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmain.c (g_main_context_unref_and_unlock):
+ When DISABLE_MEM_POOLS is set, loop through and free
+ the poll records explicitely, since g_mem_chunk_destroy()
+ won't do it. (#118121, Morten Welinder)
+
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added "is" to ALL_LINGUAS.
+Mon Aug 25 12:17:20 2003 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmain.c (g_main_context_unref_and_unlock):
+ When DISABLE_MEM_POOLS is set, loop through and free
+ the poll records explicitely, since g_mem_chunk_destroy()
+ won't do it. (#118121, Morten Welinder)
+
2003-08-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added "is" to ALL_LINGUAS.
UNLOCK_CONTEXT (context);
}
+/* If DISABLE_MEM_POOLS is defined, then freeing the
+ * mem chunk won't free the records, so we have to
+ * do it manually. The conditionalization here is
+ * an optimization; g_mem_chunk_free() is a no-op
+ * when DISABLE_MEM_POOLS is set.
+ */
+#ifdef DISABLE_MEM_POOLS
+static void
+poll_rec_list_free (GMainContext *context,
+ GPollRec *list)
+{
+ while (list)
+ {
+ GPollRec *tmp_rec = list;
+ list = list->next;
+ g_chunk_free (tmp_rec, context->poll_chunk);
+ }
+}
+#endif /* DISABLE_MEM_POOLS */
+
static void
g_main_context_unref_and_unlock (GMainContext *context)
{
g_ptr_array_free (context->pending_dispatches, TRUE);
g_free (context->cached_poll_array);
-
+
+#ifdef DISABLE_MEM_POLLS
+ poll_rec_list_free (context, context->poll_records);
+ poll_rec_list_free (context, context->poll_free_list);
+#endif /* DISABLE_MEM_POOLS */
+
if (context->poll_chunk)
g_mem_chunk_destroy (context->poll_chunk);