changeset 511:1d7a68d6ceb5

delete stuff in StyleEngine::endElement
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Wed, 29 Oct 2008 19:34:18 +0100
parents 2bc3d207f5ad
children c82c5fd9b043
files src/styleengine.cc
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/styleengine.cc	Wed Oct 29 19:30:50 2008 +0100
+++ b/src/styleengine.cc	Wed Oct 29 19:34:18 2008 +0100
@@ -51,6 +51,14 @@
 void
 StyleEngine::endElement (int tag) {
    fprintf(stderr, "===> END %d\n", tag);
+   assert (stack->size () > 0);
+
+   Node *n =  stack->getRef (stack->size () - 1);
+   if (n->style)
+      n->style->unref ();
+   if (n->nonCssProperties)
+      delete n->nonCssProperties;
+   
    stack->setSize (stack->size () - 1);
 }