[vlc-commits] gui/qt: pictureflow: clear cache on destruction

Filip Roséen git at videolan.org
Wed Mar 1 17:44:53 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar  1 10:32:31 2017 +0100| [93070491e0a2d87ada8cf31bb995da6a16be0b80] | committer: Jean-Baptiste Kempf

gui/qt: pictureflow: clear cache on destruction

PictureFlowRenderer::cache is used to store QImage's for later use,
though given that no clean-up was previously implemented we would leak
all QImage's inside the container.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93070491e0a2d87ada8cf31bb995da6a16be0b80
---

 modules/gui/qt/util/pictureflow.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/util/pictureflow.cpp b/modules/gui/qt/util/pictureflow.cpp
index a76a4ac..cf00f9d 100644
--- a/modules/gui/qt/util/pictureflow.cpp
+++ b/modules/gui/qt/util/pictureflow.cpp
@@ -257,7 +257,7 @@ PictureFlowSoftwareRenderer::PictureFlowSoftwareRenderer():
 PictureFlowSoftwareRenderer::~PictureFlowSoftwareRenderer()
 {
     buffer = QImage();
-    cache.clear();
+    qDeleteAll( cache.values() );
     delete blankSurface;
 }
 



More information about the vlc-commits mailing list