aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativepixmapcache.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-06-07 10:46:00 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-06-09 09:46:51 +0200
commit206a299923ca985b9ab8b47550f55a74f5473157 (patch)
treebbbcc750ad2a77dc8f8696145f3a5a665ff1452e /src/declarative/util/qdeclarativepixmapcache.cpp
parentd19f8ffc1ddad91a144f85f0c6aa04fece4bba27 (diff)
Fix memory leak with AnimatedImage elements.
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
Diffstat (limited to 'src/declarative/util/qdeclarativepixmapcache.cpp')
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index dce938995d..108d2579ac 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -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;
}
}