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:
parent
74ba609f0e
commit
fe5d696691
|
@ -202,6 +202,7 @@ QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope,
|
|||
*/
|
||||
QQmlExpression::~QQmlExpression()
|
||||
{
|
||||
clearError();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue