Unref pending dispatches when discarding them.

Tue Feb  5 17:13:02 2002  Owen Taylor  <otaylor@redhat.com>

        * glib/gmain.c (g_main_context_prepare): Unref pending
        dispatches when	discarding them.
This commit is contained in:
Owen Taylor 2002-02-06 00:37:38 +00:00 committed by Owen Taylor
parent b77dfd2f54
commit c55b9a4f44
9 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1,3 +1,8 @@
Tue Feb 5 17:13:02 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Unref pending
dispatches when discarding them.
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until

View File

@ -1846,6 +1846,7 @@ gboolean
g_main_context_prepare (GMainContext *context,
gint *priority)
{
gint i;
gint n_ready = 0;
gint current_priority = G_MAXINT;
GSource *source;
@ -1889,6 +1890,9 @@ g_main_context_prepare (GMainContext *context,
#endif
/* If recursing, clear list of pending dispatches */
for (i = 0; i < context->pending_dispatches->len; i++)
SOURCE_UNREF ((GSource *)context->pending_dispatches->pdata[i], context);
g_ptr_array_set_size (context->pending_dispatches, 0);
/* Prepare all sources */