diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2011-09-07 09:48:50 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-09-07 11:33:42 +0200 |
commit | 46ec93d3ff9653c7240ccba995eeef7298b479ec (patch) | |
tree | 867a97802a21298d1efdd0954832e6dd123c354e /src | |
parent | cee63e2c17c8e83a4366741da0cbd5fc852e5835 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp index ff4bf84159..c9bda58123 100644 --- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp @@ -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); |