Delete created objects
authorAaron Kennedy <aaron.kennedy@nokia.com>
Thu, 1 Dec 2011 13:59:47 +0000 (13:59 +0000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Dec 2011 14:05:14 +0000 (15:05 +0100)
This eliminates "leak" warnings that were generated when the test
exited.

Change-Id: Ia186241c05c28a6e5eb7b6b431e084f95f5934be
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp

index c6a1e0a..2535f89 100644 (file)
@@ -1278,6 +1278,8 @@ void tst_qdeclarativestates::reset()
 
     QCOMPARE(image->width(), 20.0);
     QCOMPARE(image->height(), qreal(20.));
+
+    delete rect;
 }
 
 void tst_qdeclarativestates::illegalObjectCreation()
@@ -1335,6 +1337,8 @@ void tst_qdeclarativestates::urlResolution()
     QCOMPARE(image1->source(), resolved);
     QCOMPARE(image2->source(), resolved);
     QCOMPARE(image3->source(), resolved);
+
+    delete rect;
 }
 
 void tst_qdeclarativestates::unnamedWhen()