Skip to content

Commit

Permalink
When a datasource is destroyed, remove all modules
Browse files Browse the repository at this point in the history
This ensures the modules get cleaned up.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Apr 9, 2020
1 parent f4c2d66 commit 4482381
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tomviz/DataSource.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ DataSource::DataSource(const QString& label, DataSourceType dataType,

DataSource::~DataSource()
{
ModuleManager::instance().removeAllModules(this);
if (this->Internals->ProducerProxy) {
vtkNew<vtkSMParaViewPipelineController> controller;
controller->UnRegisterProxy(this->Internals->ProducerProxy);
Expand Down

0 comments on commit 4482381

Please sign in to comment.