/** * gtk_widget_path_unref: * @path: a #GtkWidgetPath * * Decrements the reference count on @path, freeing the structure * if the reference count reaches 0. * * Since: 3.2 **/ void gtk_widget_path_unref (GtkWidgetPath *path) { guint i; gtk_internal_return_if_fail (path != NULL); path->ref_count -= 1; if (path->ref_count > 0) return; for (i = 0; i < path->elems->len; i++) { GtkPathElement *elem; elem = &g_array_index (path->elems, GtkPathElement, i); gtk_css_node_declaration_unref (elem->decl); if (elem->siblings) gtk_widget_path_unref (elem->siblings); } g_array_free (path->elems, TRUE); g_slice_free (GtkWidgetPath, path); }
static void gtk_css_node_finalize (GObject *object) { GtkCssNode *cssnode = GTK_CSS_NODE (object); if (cssnode->style) g_object_unref (cssnode->style); gtk_css_node_declaration_unref (cssnode->decl); G_OBJECT_CLASS (gtk_css_node_parent_class)->finalize (object); }
static void gtk_global_parent_cache_free (gpointer item) { gtk_css_node_declaration_unref (UNPACK_DECLARATION (item)); }