summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/expr/qtemplateparameterreference.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals@canonical.com>2016-10-27 17:43:43 +0200
committerAlbert Astals Cid <albert.astals@canonical.com>2016-11-02 09:21:50 +0000
commit6b6f7db32e7c9ca4bdda0341994dca1212b53e20 (patch)
tree26e2790d4f8dec77e162ffeeeb9c407839e0cc40 /src/xmlpatterns/expr/qtemplateparameterreference.cpp
parent66be7fd267fa432f79a9f2bb6edc6a76285a7f39 (diff)
downloadqtxmlpatterns-6b6f7db32e7c9ca4bdda0341994dca1212b53e20.tar.gz
Fix memory leak
We can't have the ExpressionVariableReference/TemplateParameterReference holding a Ptr of VariableDeclaration because the VariableDeclaration holds a Ptr of them (in the references member) so they were referencing eachother and the reference count never reaches 0. Task-number: QTBUG-32745 Change-Id: I4cda6d9eccad123984f4ad35db3e56da01d4d5b1 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
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 b2555a2..98808ab 100644
--- a/src/xmlpatterns/expr/qtemplateparameterreference.cpp
+++ b/src/xmlpatterns/expr/qtemplateparameterreference.cpp
@@ -39,7 +39,7 @@ QT_BEGIN_NAMESPACE
using namespace QPatternist;
-TemplateParameterReference::TemplateParameterReference(const VariableDeclaration::Ptr &varDecl) : m_varDecl(varDecl)
+TemplateParameterReference::TemplateParameterReference(const VariableDeclaration *varDecl) : m_varDecl(varDecl)
{
}