summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-26 20:13:35 -0300
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-27 16:18:30 -0300
commit7a930ec85684a38212165aff29ed84d95bd43d32 (patch)
tree213b39d604c079ddb43a8cf208333834781bf934 /examples
parentb70256432c2393afb5686c9ef61e38ff399be954 (diff)
downloadqt4-tools-7a930ec85684a38212165aff29ed84d95bd43d32.tar.gz
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')
-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 f898d1d245..389bc9e791 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();
}