diff data/model/FFTModel.cpp @ 360:ac300d385ab2

* Various fixes to object lifetime management, particularly in the spectrum layer and for notification of main model deletion. The main purpose of this is to improve the behaviour of the spectrum, but I think it may also help with #1840922 Various crashes in Layer Summary window.
author Chris Cannam
date Wed, 23 Jan 2008 15:43:27 +0000
parents aa8dbac62024
children cc4eb32efc6c
line wrap: on
line diff
--- a/data/model/FFTModel.cpp	Tue Jan 22 23:11:48 2008 +0000
+++ b/data/model/FFTModel.cpp	Wed Jan 23 15:43:27 2008 +0000
@@ -82,6 +82,14 @@
     if (m_server) FFTDataServer::releaseInstance(m_server);
 }
 
+void
+FFTModel::sourceModelAboutToBeDeleted()
+{
+    if (m_sourceModel) {
+        FFTDataServer::modelAboutToBeDeleted(m_sourceModel);
+    }
+}
+
 FFTDataServer *
 FFTModel::getServer(const DenseTimeValueModel *model,
                     int channel,