[libdazzle] tree-node: use GSlice for popup info



commit 878b0c012dbfcf60d672320bf5ecdce673cd2a4b
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 9 18:04:14 2018 -0800

    tree-node: use GSlice for popup info

 src/tree/dzl-tree-node.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/tree/dzl-tree-node.c b/src/tree/dzl-tree-node.c
index 6847805..dd4b23f 100644
--- a/src/tree/dzl-tree-node.c
+++ b/src/tree/dzl-tree-node.c
@@ -1037,9 +1037,9 @@ dzl_tree_node_show_popover_timeout_cb (gpointer data)
   gtk_popover_popup (popreq->popover);
 
 cleanup:
-  g_object_unref (popreq->self);
-  g_object_unref (popreq->popover);
-  g_free (popreq);
+  g_clear_object (&popreq->self);
+  g_clear_object (&popreq->popover);
+  g_slice_free (PopupRequest, popreq);
 
   return G_SOURCE_REMOVE;
 }
@@ -1065,7 +1065,7 @@ dzl_tree_node_show_popover (DzlTreeNode *self,
                                                    &cell_area.x,
                                                    &cell_area.y);
 
-  popreq = g_new0 (PopupRequest, 1);
+  popreq = g_slice_new0 (PopupRequest);
   popreq->self = g_object_ref (self);
   popreq->popover = g_object_ref (popover);
 


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