From fe5d69669197a51662061b014810f0242eec5ca7 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 23 Feb 2017 15:11:13 +0100 Subject: Fix QQmlExpression leaking QQmlError objects If the user doesn't clear any potential errors manually via clearError(), then do it automatically in the destructor. Found with valgrind. [ChangeLog][QtQml][QQmlExpression] Fixed memory leak Change-Id: If5b1181850c7463c939a7ba536d74e7054c53d60 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlexpression.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/qml/qqmlexpression.cpp') diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp index 94b1eaab52..adfa1c2674 100644 --- a/src/qml/qml/qqmlexpression.cpp +++ b/src/qml/qml/qqmlexpression.cpp @@ -202,6 +202,7 @@ QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope, */ QQmlExpression::~QQmlExpression() { + clearError(); } /*! -- cgit v1.2.3