diff options
author | Niklas Kurkisuo <ext-niklas.kurkisuo@nokia.com> | 2010-12-03 13:50:36 +0200 |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-05-13 15:56:29 +0200 |
commit | 23267553627ac3c4cbcd918283bee8e665deeff9 (patch) | |
tree | 9301d656c9cd80c81192538231f0731c0b3c7850 /src/xmlpatterns/expr/qexpressionvariablereference.cpp | |
parent | 3d27a19ca009836b812b59c3359db1369d391181 (diff) |
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/qexpressionvariablereference.cpp')
-rw-r--r-- | src/xmlpatterns/expr/qexpressionvariablereference.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/expr/qexpressionvariablereference.cpp b/src/xmlpatterns/expr/qexpressionvariablereference.cpp index 3b9ecb12f1..fda87b5b2e 100644 --- a/src/xmlpatterns/expr/qexpressionvariablereference.cpp +++ b/src/xmlpatterns/expr/qexpressionvariablereference.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE using namespace QPatternist; ExpressionVariableReference::ExpressionVariableReference(const VariableSlotID slotP, - const VariableDeclaration::Ptr &varDecl) : VariableReference(slotP) + const VariableDeclaration *varDecl) : VariableReference(slotP) , m_varDecl(varDecl) { } |