[gtk+] size request: Avoid unnecessary reffing



commit cd35a14bbb724baf1fa07b124abb05e4bd6ce69e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 20 00:55:23 2015 -0400

    size request: Avoid unnecessary reffing
    
    There is no particular reason why we should have to ref the
    widgets if they are in a size group - we are not reffing them
    in the simple case either.

 gtk/gtksizerequest.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index 058f01f..393af7c 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -393,8 +393,6 @@ gtk_widget_compute_size_for_orientation (GtkWidget        *widget,
 
   widgets = _gtk_size_group_get_widget_peers (widget, orientation);
 
-  g_hash_table_foreach (widgets, (GHFunc) g_object_ref, NULL);
-  
   g_hash_table_iter_init (&iter, widgets);
   while (g_hash_table_iter_next (&iter, &key, NULL))
     {
@@ -407,8 +405,6 @@ gtk_widget_compute_size_for_orientation (GtkWidget        *widget,
       nat_result = MAX (nat_result, nat_dimension);
     }
 
-  g_hash_table_foreach (widgets, (GHFunc) g_object_unref, NULL);
-
   g_hash_table_destroy (widgets);
 
   /* Baselines make no sense with sizegroups really */


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