From 206a299923ca985b9ab8b47550f55a74f5473157 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 7 Jun 2011 10:46:00 +0200 Subject: 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 --- src/declarative/util/qdeclarativepixmapcache.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/declarative/util/qdeclarativepixmapcache.cpp') 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; } } -- cgit v1.2.3