From 44823813848fcfe74f0d92d6e4f8693b4819833a Mon Sep 17 00:00:00 2001 From: Patrick Avery Date: Thu, 9 Apr 2020 15:07:26 -0400 Subject: [PATCH] When a datasource is destroyed, remove all modules This ensures the modules get cleaned up. Signed-off-by: Patrick Avery --- tomviz/DataSource.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/tomviz/DataSource.cxx b/tomviz/DataSource.cxx index e155d454e..85a5ada17 100644 --- a/tomviz/DataSource.cxx +++ b/tomviz/DataSource.cxx @@ -168,6 +168,7 @@ DataSource::DataSource(const QString& label, DataSourceType dataType, DataSource::~DataSource() { + ModuleManager::instance().removeAllModules(this); if (this->Internals->ProducerProxy) { vtkNew controller; controller->UnRegisterProxy(this->Internals->ProducerProxy);