diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2011-09-07 06:16:14 (GMT) |
---|---|---|
committer | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2011-09-07 06:16:14 (GMT) |
commit | 80f9451b605aa2eb181d76b79bc1869a3cd9e513 (patch) | |
tree | 955a0e919bd05f86c2468009804a64b336b657ab /src/gui/graphicsview | |
parent | 6f84e64f3500db9901bb518c8c5bd2ca03fbbf42 (diff) | |
download | Qt-80f9451b605aa2eb181d76b79bc1869a3cd9e513.zip Qt-80f9451b605aa2eb181d76b79bc1869a3cd9e513.tar.gz Qt-80f9451b605aa2eb181d76b79bc1869a3cd9e513.tar.bz2 |
Do not leak memory
Task-number: QT-4333
Reviewed-by: Trustme
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index eaa8ac2..deda3ff 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/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); |