summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/expr/qtemplateparameterreference.cpp
diff options
context:
space:
mode:
authorNiklas Kurkisuo <ext-niklas.kurkisuo@nokia.com>2010-12-03 11:50:36 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-05-13 13:56:29 (GMT)
commit23267553627ac3c4cbcd918283bee8e665deeff9 (patch)
tree9301d656c9cd80c81192538231f0731c0b3c7850 /src/xmlpatterns/expr/qtemplateparameterreference.cpp
parent3d27a19ca009836b812b59c3359db1369d391181 (diff)
downloadQt-23267553627ac3c4cbcd918283bee8e665deeff9.zip
Qt-23267553627ac3c4cbcd918283bee8e665deeff9.tar.gz
Qt-23267553627ac3c4cbcd918283bee8e665deeff9.tar.bz2
Fix memory leak in QXmlQuery::setQuery.
There is a circular reference dependency between VariableDeclaration and the classes EvaluationCache, ExpressionVariableReference and TemplateParameterReference. By removing the explicitly shared pointer of VariableDeclaration in these classes the circle is broken and memory is freed correctly. Task-number: QT-4106 Integrated-by: David Boddie
Diffstat (limited to 'src/xmlpatterns/expr/qtemplateparameterreference.cpp')
-rw-r--r--src/xmlpatterns/expr/qtemplateparameterreference.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/expr/qtemplateparameterreference.cpp b/src/xmlpatterns/expr/qtemplateparameterreference.cpp
index 550e39f..15d65f9 100644
--- a/src/xmlpatterns/expr/qtemplateparameterreference.cpp
+++ b/src/xmlpatterns/expr/qtemplateparameterreference.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
using namespace QPatternist;
-TemplateParameterReference::TemplateParameterReference(const VariableDeclaration::Ptr &varDecl) : m_varDecl(varDecl)
+TemplateParameterReference::TemplateParameterReference(const VariableDeclaration *varDecl) : m_varDecl(varDecl)
{
}