#12535 Avoid use of caf::PdmPointer in async delete of objects

Remove the use of caf::PdmPointer in RifCalculatedSummaryCurveReader as these objects are only accessed and used only during the lifetime of the owning object.

Move caching of RimProject::current()->calculationCollection() to the constructor instead of the calling site.
This commit is contained in:
Magne Sjaastad committed 2025-05-30 08:41:14 +02:00
1 parent fe9cac4fba
commit 5ba4256e8b
5 files changed
+12 -19

No files matched your search

@@ -30,8 +30,6 @@
#include "SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeatureUi.h"
#include "RimCalculatedSummaryCurveReader.h"
#include "RimProject.h"
#include "RimSummaryCalculationCollection.h"
#include "cafUtils.h"
@@ -76,8 +74,7 @@ void RimCsvUserData::createSummaryReaderInterface()
m_multiSummaryReader = new RifMultipleSummaryReaders;
m_multiSummaryReader->addReader( m_summaryReader.p() );
RimSummaryCalculationCollection* calcColl = RimProject::current()->calculationCollection();
m_calculatedSummaryReader = new RifCalculatedSummaryCurveReader( calcColl, this );
m_calculatedSummaryReader = new RifCalculatedSummaryCurveReader( this );
m_multiSummaryReader->addReader( m_calculatedSummaryReader.p() );
}