summaryrefslogtreecommitdiffstats
path: root/examples/graphicsview
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-26 23:13:35 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-27 19:18:30 (GMT)
commit7a930ec85684a38212165aff29ed84d95bd43d32 (patch)
tree213b39d604c079ddb43a8cf208333834781bf934 /examples/graphicsview
parentb70256432c2393afb5686c9ef61e38ff399be954 (diff)
downloadQt-7a930ec85684a38212165aff29ed84d95bd43d32.zip
Qt-7a930ec85684a38212165aff29ed84d95bd43d32.tar.gz
Qt-7a930ec85684a38212165aff29ed84d95bd43d32.tar.bz2
QGAL (Test): Fix memory leaks in example and tests
Some tests and the example were leaking memory what made it harder to investigate leaks on the layout itself. Those were simple errors like not deleting the layout at the end of the test and were corrected. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
Diffstat (limited to 'examples/graphicsview')
-rw-r--r--examples/graphicsview/anchorlayout/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp
index f898d1d..389bc9e 100644
--- a/examples/graphicsview/anchorlayout/main.cpp
+++ b/examples/graphicsview/anchorlayout/main.cpp
@@ -122,8 +122,8 @@ int main(int argc, char **argv)
scene.addItem(w);
scene.setBackgroundBrush(Qt::darkGreen);
- QGraphicsView *view = new QGraphicsView(&scene);
- view->show();
+ QGraphicsView view(&scene);
+ view.show();
return app.exec();
}