summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/data/qitem_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/data/qitem_p.h')
-rw-r--r--src/xmlpatterns/data/qitem_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xmlpatterns/data/qitem_p.h b/src/xmlpatterns/data/qitem_p.h
index 8184b25..fb3866e 100644
--- a/src/xmlpatterns/data/qitem_p.h
+++ b/src/xmlpatterns/data/qitem_p.h
@@ -408,6 +408,10 @@ namespace QPatternist
inline void reset()
{
+ /* Delete the atomicValue if necessary*/
+ if(isAtomicValue() && !atomicValue->ref.deref())
+ delete atomicValue;
+
/* Note that this function should be equal to the default
* constructor. */
node.model = 0;