changeset 1215:c603aba61702 3.0-integration

Fix memory leak of cache pixmaps in View
author Chris Cannam
date Fri, 13 Jan 2017 10:22:04 +0000
parents be42a33a3db6
children dc2af6616c83
files view/View.cpp view/View.h
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Thu Jan 05 14:30:49 2017 +0000
+++ b/view/View.cpp	Fri Jan 13 10:22:04 2017 +0000
@@ -80,6 +80,8 @@
 
     m_deleting = true;
     delete m_propertyContainer;
+    delete m_cache;
+    delete m_buffer;
 }
 
 PropertyContainer::PropertyList
--- a/view/View.h	Thu Jan 05 14:30:49 2017 +0000
+++ b/view/View.h	Fri Jan 13 10:22:04 2017 +0000
@@ -490,8 +490,8 @@
     bool                m_lightBackground;
     bool                m_showProgress;
 
-    QPixmap            *m_cache;
-    QPixmap            *m_buffer;
+    QPixmap            *m_cache;  // I own this
+    QPixmap            *m_buffer; // I own this
     sv_frame_t          m_cacheCentreFrame;
     int                 m_cacheZoomLevel;
     bool                m_selectionCached;