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>
This commit is contained in:
Robert Griebl 2017-02-23 15:11:13 +01:00
parent 74ba609f0e
commit fe5d696691
1 changed files with 1 additions and 0 deletions

View File

@ -202,6 +202,7 @@ QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope,
*/
QQmlExpression::~QQmlExpression()
{
clearError();
}
/*!