diff options
author | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-05-29 16:44:24 (GMT) |
---|---|---|
committer | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-07-22 18:04:20 (GMT) |
commit | efb7495717b7fd84996a59ee99c9632aa4f43467 (patch) | |
tree | 7d9e8eb357382d78dba3ef2809a1ec4b810fe5b8 /src/gui/graphicsview/qsimplex_p.cpp | |
parent | 4cecce2273d45e42136f70d3ae6453aa37e1d934 (diff) | |
download | Qt-efb7495717b7fd84996a59ee99c9632aa4f43467.zip Qt-efb7495717b7fd84996a59ee99c9632aa4f43467.tar.gz Qt-efb7495717b7fd84996a59ee99c9632aa4f43467.tar.bz2 |
QGraphicsAnchorLayout: Fix memory management issue in QSimplex solver
Both QGraphicsAnchorLayoutPrivate::solveMinMax() and solvePreferred()
were deleting the linear programming contraints while QSimplex still
had them.
For solveMinMax(), move the creation of constraints out of that
method.
For solvePreferred(), create the simplex solver in the heap so it can
be deleted before the constraints are.
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qsimplex_p.cpp')
-rw-r--r-- | src/gui/graphicsview/qsimplex_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp index 4ed11c4..774af8c 100644 --- a/src/gui/graphicsview/qsimplex_p.cpp +++ b/src/gui/graphicsview/qsimplex_p.cpp @@ -5,7 +5,7 @@ #include <stdlib.h> -QSimplex::QSimplex() : rows(0), columns(0), firstArtificial(0), matrix(0) +QSimplex::QSimplex() : objective(0), rows(0), columns(0), firstArtificial(0), matrix(0) { } |