diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2017-02-23 15:11:13 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2017-02-23 14:31:54 +0000 |
commit | fe5d69669197a51662061b014810f0242eec5ca7 (patch) | |
tree | d493b8a623ce73cdc62a531a0e62ca6539567e39 /src | |
parent | 74ba609f0e1a903ce516b56544916fbd06f5b7a6 (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlexpression.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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(); } /*! |