diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-12 21:34:50 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-12 21:34:50 +0100 |
commit | 8897847aa556384d0a0d7bbaccd9241e0f4470d1 (patch) | |
tree | e4e92060b00b36b2fe187188ee4bec1f71776258 | |
parent | c4641079e8dada86a5f4846ef8027f88c11c7294 (diff) |
remove CssRule reference counting
-rw-r--r-- | src/css.cc | 4 | ||||
-rw-r--r-- | src/css.hh | 3 |
2 files changed, 1 insertions, 6 deletions
@@ -157,7 +157,6 @@ void CssSimpleSelector::print () { } CssRule::CssRule (CssSelector *selector, CssPropertyList *props) { - refCount = 0; this->selector = selector; this->selector->ref (); this->props = props; @@ -191,7 +190,7 @@ CssStyleSheet::CssStyleSheet () { CssStyleSheet::~CssStyleSheet () { for (int i = 0; i < ntags; i++) { for (int j = 0; j < elementTable[i]->size (); j++) - elementTable[i]->get (j)->unref (); + delete elementTable[i]->get (j); delete elementTable[i]; } @@ -232,7 +231,6 @@ void CssStyleSheet::addRule (CssRule *rule) { if (ruleList) { ruleList->increase (); *ruleList->getRef (ruleList->size() - 1) = rule; - rule->ref (); } } @@ -255,7 +255,6 @@ class CssSelector { */ class CssRule { private: - int refCount; CssPropertyList *props; public: @@ -265,8 +264,6 @@ class CssRule { ~CssRule (); void apply (CssPropertyList *props, Doctree *docTree); - inline void ref () { refCount++; } - inline void unref () { if(--refCount == 0) delete this; } void print (); }; |