Fix memory leak when using async image providers
authorAlbert Astals Cid <albert.astals@canonical.com>
Fri, 14 Aug 2015 12:49:54 +0000 (14:49 +0200)
committerAlbert Astals Cid <albert.astals@canonical.com>
Wed, 19 Aug 2015 10:18:34 +0000 (10:18 +0000)
Change-Id: I08392ab0a3edb1ac162110ebc349ad457800c788
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
src/quick/util/qquickpixmapcache.cpp

index 6f6e91e..a77bfd1 100644 (file)
@@ -579,6 +579,7 @@ void QQuickPixmapReader::processJobs()
                     if (asyncResponse) {
                         asyncResponses.remove(asyncResponse);
                         asyncResponse->cancel();
+                        asyncResponse->deleteLater();
                     }
                 }
                 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(job->url));