Fix memory leak with AnimatedImage elements.
authorGunnar Sletta <gunnar.sletta@nokia.com>
Tue, 7 Jun 2011 08:46:00 +0000 (10:46 +0200)
committerGunnar Sletta <gunnar.sletta@nokia.com>
Thu, 9 Jun 2011 07:46:51 +0000 (09:46 +0200)
When textures are constructed from pixmaps, we need to store
the context they were constructed in so that they may also
be cleaned up later.

Change-Id: Ibdf5f60b598914d630c622341fae206f46cb9629

src/declarative/util/qdeclarativepixmapcache.cpp

index dce9389..108d257 100644 (file)
@@ -1119,6 +1119,7 @@ QSGTexture *QDeclarativePixmap::texture(QSGContext *context) const
             return d->texture;
         else if (d->pixmapStatus == Ready) {
             d->texture = context->createTexture(d->pixmap.toImage());
+            d->context = context;
             return d->texture;
         }
     }