Code cleanup
Use g_slist_free_full more consistently. This commit just converts the obvious cases where g_slist_forall is directly followed by g_slist_free.
This commit is contained in:
@ -1018,11 +1018,8 @@ gtk_rc_style_finalize (GObject *object)
|
||||
rc_style->rc_properties = NULL;
|
||||
}
|
||||
|
||||
g_slist_foreach (rc_style->icon_factories, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (rc_style->icon_factories);
|
||||
|
||||
g_slist_foreach (rc_priv->color_hashes, (GFunc) g_hash_table_unref, NULL);
|
||||
g_slist_free (rc_priv->color_hashes);
|
||||
g_slist_free_full (rc_style->icon_factories, g_object_unref);
|
||||
g_slist_free_full (rc_priv->color_hashes, (GDestroyNotify)g_hash_table_unref);
|
||||
|
||||
G_OBJECT_CLASS (gtk_rc_style_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@ -542,8 +542,7 @@ gtk_style_finalize (GObject *object)
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_foreach (style->icon_factories, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (style->icon_factories);
|
||||
g_slist_free_full (style->icon_factories, g_object_unref);
|
||||
|
||||
pango_font_description_free (style->font_desc);
|
||||
|
||||
@ -1108,8 +1107,7 @@ gtk_style_real_copy (GtkStyle *style,
|
||||
if (src->rc_style)
|
||||
g_object_ref (src->rc_style);
|
||||
|
||||
g_slist_foreach (style->icon_factories, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (style->icon_factories);
|
||||
g_slist_free_full (style->icon_factories, g_object_unref);
|
||||
style->icon_factories = g_slist_copy (src->icon_factories);
|
||||
g_slist_foreach (style->icon_factories, (GFunc) g_object_ref, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user