vlc | branch: master | Filip Roséen <[email protected]> | 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 <[email protected]>

> 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;
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to