diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp index ee4662102d..0f4b59a0ba 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveCreatorDialog.cpp @@ -84,5 +84,4 @@ void RicSummaryCurveCreatorDialog::slotDialogFinished() { plotwindow->cleanUpTemporaryWidgets(); } - RifReaderEclipseSummary::purgeCache(); } diff --git a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp index fec6599481..5b78dd74cf 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp @@ -570,14 +570,6 @@ void RifReaderEclipseSummary::markForCachePurge( const RifEclipseSummaryAddress& m_valuesCache->markAddressForPurge( address ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderEclipseSummary::purgeCache() -{ - ValuesCache::purge(); -} - #if 0 //-------------------------------------------------------------------------------------------------- /// @@ -597,26 +589,17 @@ void RifReaderEclipseSummary::populateVectorFromStringList(stringlist_type* stri //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const std::vector RifReaderEclipseSummary::ValuesCache::EMPTY_VECTOR; -std::set RifReaderEclipseSummary::ValuesCache::m_instances; +const std::vector RifReaderEclipseSummary::ValuesCache::EMPTY_VECTOR; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifReaderEclipseSummary::ValuesCache::ValuesCache() -{ - // Register instance - m_instances.insert( this ); -} +RifReaderEclipseSummary::ValuesCache::ValuesCache() {} //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifReaderEclipseSummary::ValuesCache::~ValuesCache() -{ - // Deregister instance - m_instances.erase( this ); -} +RifReaderEclipseSummary::ValuesCache::~ValuesCache() {} //-------------------------------------------------------------------------------------------------- /// @@ -648,15 +631,6 @@ void RifReaderEclipseSummary::ValuesCache::markAddressForPurge( const RifEclipse m_purgeList.insert( address ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifReaderEclipseSummary::ValuesCache::purge() -{ - for ( auto instance : m_instances ) - instance->purgeData(); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifReaderEclipseSummary.h b/ApplicationCode/FileInterface/RifReaderEclipseSummary.h index 4e8abecdc0..412ac5d6d4 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseSummary.h +++ b/ApplicationCode/FileInterface/RifReaderEclipseSummary.h @@ -84,8 +84,7 @@ public: return m_warnings; } - void markForCachePurge( const RifEclipseSummaryAddress& address ) override; - static void purgeCache(); + void markForCachePurge( const RifEclipseSummaryAddress& address ) override; private: int timeStepCount() const; @@ -122,15 +121,12 @@ private: void insertValues( const RifEclipseSummaryAddress& address, const std::vector& values ); const std::vector& getValues( const RifEclipseSummaryAddress& address ) const; void markAddressForPurge( const RifEclipseSummaryAddress& address ); - static void purge(); private: void purgeData(); std::map> m_cachedValues; std::set m_purgeList; - - static std::set m_instances; }; std::unique_ptr m_valuesCache;