Mercurial > hg > svcore
diff data/model/AlignmentModel.cpp @ 1686:e73baeead27f single-point
Model deletion issues - the AlignmentModel doesn't actually need to know about the input aggregate model; the document should own it instead
author | Chris Cannam |
---|---|
date | Thu, 04 Apr 2019 11:15:43 +0100 |
parents | f97d64b8674f |
children | d08b560102a1 |
line wrap: on
line diff
--- a/data/model/AlignmentModel.cpp Wed Apr 03 16:19:20 2019 +0100 +++ b/data/model/AlignmentModel.cpp Thu Apr 04 11:15:43 2019 +0100 @@ -21,11 +21,9 @@ AlignmentModel::AlignmentModel(Model *reference, Model *aligned, - Model *inputModel, SparseTimeValueModel *path) : m_reference(reference), m_aligned(aligned), - m_inputModel(inputModel), m_rawPath(path), m_path(nullptr), m_reversePath(nullptr), @@ -55,9 +53,6 @@ AlignmentModel::~AlignmentModel() { SVDEBUG << "AlignmentModel(" << this << ")::~AlignmentModel()" << endl; - - if (m_inputModel) m_inputModel->aboutToDelete(); - delete m_inputModel; if (m_rawPath) m_rawPath->aboutToDelete(); delete m_rawPath; @@ -214,10 +209,7 @@ constructPath(); constructReversePath(); - SVDEBUG << "AlignmentModel: path complete, deleting input" << endl; - if (m_inputModel) m_inputModel->aboutToDelete(); - delete m_inputModel; - m_inputModel = nullptr; + SVDEBUG << "AlignmentModel: path complete" << endl; } }