[gtk+] css: Don't keep around linear selectors
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] css: Don't keep around linear selectors
- Date: Fri, 30 Nov 2012 13:57:24 +0000 (UTC)
commit d69c6fff7ab96acc7554827afb5ac346f9ce507d
Author: Alexander Larsson <alexl redhat com>
Date: Thu Nov 29 17:28:51 2012 +0100
css: Don't keep around linear selectors
Now we use the selector tree everywhere, so there is no need to
keep around the linear selectors unless we're using them to
verify the tree correctness, so free them.
gtk/gtkcssprovider.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index b289b14..a8e13ed 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2430,6 +2430,18 @@ gtk_css_provider_postprocess (GtkCssProvider *css_provider)
priv->tree = _gtk_css_selector_tree_builder_build (builder);
_gtk_css_selector_tree_builder_free (builder);
+
+#ifndef VERIFY_TREE
+ for (i = 0; i < priv->rulesets->len; i++)
+ {
+ GtkCssRuleset *ruleset;
+
+ ruleset = &g_array_index (priv->rulesets, GtkCssRuleset, i);
+
+ _gtk_css_selector_free (ruleset->selector);
+ ruleset->selector = NULL;
+ }
+#endif
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]