From 7645ab1736d46703bbb0740a995ba0f4af8c33df Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 29 Aug 2021 18:38:11 +0200 Subject: [PATCH] Fix memory leak of animated image textures --- src/ui/MxcAnimatedImage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/MxcAnimatedImage.cpp b/src/ui/MxcAnimatedImage.cpp index 3c93cc2b..3db5ef60 100644 --- a/src/ui/MxcAnimatedImage.cpp +++ b/src/ui/MxcAnimatedImage.cpp @@ -152,8 +152,10 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD imageDirty = false; QSGImageNode *n = static_cast(oldNode); - if (!n) + if (!n) { n = window()->createImageNode(); + n->setOwnsTexture(true); + } // n->setTexture(nullptr); auto img = movie.currentImage();