diff data/model/Dense3DModelPeakCache.cpp @ 1384:368449629a30

Fix various "model deleted with no aboutToDelete notification" warnings (and one associated potential memory leak)
author Chris Cannam
date Wed, 22 Feb 2017 12:01:39 +0000
parents f5f83fb49852
children 48e9f538e6e9
line wrap: on
line diff
--- a/data/model/Dense3DModelPeakCache.cpp	Wed Feb 22 09:53:41 2017 +0000
+++ b/data/model/Dense3DModelPeakCache.cpp	Wed Feb 22 12:01:39 2017 +0000
@@ -35,11 +35,11 @@
             this, SLOT(sourceModelChanged()));
     connect(source, SIGNAL(aboutToBeDeleted()),
             this, SLOT(sourceModelAboutToBeDeleted()));
-
 }
 
 Dense3DModelPeakCache::~Dense3DModelPeakCache()
 {
+    if (m_cache) m_cache->aboutToDelete();
     delete m_cache;
 }