From bd5345637453697269bb20bd8d25128432ea8265 Mon Sep 17 00:00:00 2001 From: Colin Ogilvie Date: Fri, 2 Jun 2017 11:37:09 +0100 Subject: Don't leak QQmlJavaScriptExpression errors Ensure any error is deleted when the expression is Change-Id: Ibbfd28f50279d4c66830b40c5c917eb8d98f266e Reviewed-by: Simon Hausmann (cherry picked from commit 1e0685136d0debb2a3b62d9f4650c95afe41913b) --- src/qml/qml/qqmljavascriptexpression.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index cd2f120218..1c4890aaa8 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -100,6 +100,7 @@ QQmlJavaScriptExpression::~QQmlJavaScriptExpression() } clearGuards(); + clearError(); if (m_scopeObject.isT2()) // notify DeleteWatcher of our deletion. m_scopeObject.asT2()->_s = 0; } -- cgit v1.2.3