From 7a930ec85684a38212165aff29ed84d95bd43d32 Mon Sep 17 00:00:00 2001 From: "Eduardo M. Fleury" Date: Thu, 26 Nov 2009 20:13:35 -0300 Subject: 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 Reviewed-by: Artur Duque de Souza --- examples/graphicsview/anchorlayout/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/graphicsview') 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(); } -- cgit v1.2.3