[gtk/gtk-3-24] quartz: release linked list as we process it
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] quartz: release linked list as we process it
- Date: Thu, 31 Jan 2019 16:55:53 +0000 (UTC)
commit 99d013994bba1736973aeb62d57368aeac9fdf3e
Author: Christian Hergert <christian hergert me>
Date: Wed Sep 30 18:34:16 2015 -0700
quartz: release linked list as we process it
Rather than performing the list iteration and the list free as separate
steps, free the list link while iterating.
gdk/quartz/gdkwindow-quartz.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 200c7018a9..d2213f0592 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -430,7 +430,6 @@ _gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
void
_gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
{
- GSList *old_update_nswindows = update_nswindows;
GSList *tmp_list = update_nswindows;
update_nswindows = NULL;
@@ -448,11 +447,9 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
#endif
[nswindow release];
- tmp_list = tmp_list->next;
+ tmp_list = g_slist_remove_link (tmp_list, tmp_list);
}
- g_slist_free (old_update_nswindows);
-
in_process_all_updates = FALSE;
if (gdk_quartz_osx_version() >= GDK_OSX_EL_CAPITAN)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]