[gtk+/wip/chergert/quartz-frame-clock: 221/228] quartz: micro optimize freeing list



commit 77d86474d72c3521e7dc46010ce8fd188f4791f1
Author: Christian Hergert <christian hergert me>
Date:   Fri Sep 11 15:04:38 2015 -0700

    quartz: micro optimize freeing list
    
    We can free the list items as we go

 gdk/quartz/gdkwindow-quartz.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 652aa23..35b4c84 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -376,7 +376,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;
@@ -391,11 +390,9 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
       [nswindow flushWindow];
       [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;
 
   NSEnableScreenUpdates ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]