diff framework/SVFileReader.cpp @ 693:3c5dc95bea91 by-id

Tidy
author Chris Cannam
date Wed, 17 Jul 2019 13:28:37 +0100
parents c8ba09756eff
children 94ca0ade69b6
line wrap: on
line diff
--- a/framework/SVFileReader.cpp	Wed Jul 17 11:20:24 2019 +0100
+++ b/framework/SVFileReader.cpp	Wed Jul 17 13:28:37 2019 +0100
@@ -476,19 +476,10 @@
             continue;
         }
 
-        //!!! todo: review this (i.e. who causes the release of what)
+        m_document->addNonDerivedModel(modelId);
         
-        // don't want to add alignment models to the document, because
-        // their lifespans are entirely dictated by the models that
-        // "own" them even though they were read independently from
-        // the .sv file.  (pity we don't have a nicer way to handle
-        // this)
-        if (!ModelById::isa<AlignmentModel>(modelId)) {
-            m_document->addNonDerivedModel(modelId);
-        }
-        
-        // but we add all models including alignment ones to the added
-        // set, so they don't get released by our own destructor
+        // make a note of all models that have been added to the
+        // document, so they don't get released by our own destructor
         m_addedModels.insert(modelId);
     }
 }