[gtk+] unrealize: Don't ref twice



commit 855c4dc0ce7aacc2970f9ff4c9e05f4b2fc7c9a1
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 16 11:54:38 2015 -0400

    unrealize: Don't ref twice
    
    After the recent change to add an outermost ref/unref pair,
    we can do away with the inner one.

 gtk/gtkwidget.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5e0a9cb..25ba751 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5577,8 +5577,6 @@ gtk_widget_unrealize (GtkWidget *widget)
 
   if (gtk_widget_get_realized (widget))
     {
-      g_object_ref (widget);
-
       if (widget->priv->mapped)
         gtk_widget_unmap (widget);
 
@@ -5588,8 +5586,6 @@ gtk_widget_unrealize (GtkWidget *widget)
       g_signal_emit (widget, widget_signals[UNREALIZE], 0);
       g_assert (!widget->priv->mapped);
       gtk_widget_set_realized (widget, FALSE);
-
-      g_object_unref (widget);
     }
 
   gtk_widget_pop_verify_invariants (widget);


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