Do not leak memory

Task-number: QT-4333

Change-Id: Idadb3eec3ac1b8775017ead6deff38e22d5b04b2
Reviewed-on: http://codereview.qt.nokia.com/4323
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
This commit is contained in:
Jan-Arve Saether 2011-09-07 09:48:50 +02:00 committed by Richard Moe Gustavsen
parent cee63e2c17
commit 46ec93d3ff

View File

@ -2966,11 +2966,12 @@ bool QGraphicsAnchorLayoutPrivate::solvePreferred(const QList<QSimplexConstraint
AnchorData *ad = variables.at(i);
ad->sizeAtPreferred = ad->result - g_offset;
}
// Make sure we delete the simplex solver -before- we delete the
// constraints used by it.
delete simplex;
}
// Make sure we delete the simplex solver -before- we delete the
// constraints used by it.
delete simplex;
// Delete constraints and variables we created.
qDeleteAll(preferredConstraints);
qDeleteAll(preferredVariables);