diff options
-rw-r--r-- | project2/basics/options/preload.cpp | 2 | ||||
-rw-r--r-- | project2/common/scripts.cpp | 6 | ||||
-rw-r--r-- | project2/common/scripts.h | 1 | ||||
-rw-r--r-- | project2/ice/iceDaemon.cpp | 2 | ||||
-rw-r--r-- | project2/ice/iceDataSource.cpp | 2 |
5 files changed, 13 insertions, 0 deletions
diff --git a/project2/basics/options/preload.cpp b/project2/basics/options/preload.cpp index 006391d..b3c126e 100644 --- a/project2/basics/options/preload.cpp +++ b/project2/basics/options/preload.cpp @@ -1,6 +1,7 @@ #include <pch.hpp> #include <options.h> #include <library.h> +#include <scripts.h> #include <boost/filesystem/path.hpp> #include <map> #include <dlfcn.h> @@ -41,6 +42,7 @@ class Preload { static void UnloadLibraries() { + ScriptReader::clearCache(); libs.clear(); } diff --git a/project2/common/scripts.cpp b/project2/common/scripts.cpp index 2b52db5..8801841 100644 --- a/project2/common/scripts.cpp +++ b/project2/common/scripts.cpp @@ -67,6 +67,12 @@ ScriptReader::load(const CommonObjects * co, bool childrenOnly) const loader.collectAll(co, childrenOnly, root()); } +void +ScriptReader::clearCache() +{ + scriptCache.clear(); +} + ScriptReaderPtr ScriptReader::resolveScript(const std::string & group, const std::string & name, bool ii) { diff --git a/project2/common/scripts.h b/project2/common/scripts.h index 7d43a01..775a080 100644 --- a/project2/common/scripts.h +++ b/project2/common/scripts.h @@ -73,6 +73,7 @@ class ScriptReader : public virtual IntrusivePtrBase { mutable LoaderBase loader; static ScriptReaderPtr resolveScript(const std::string & group, const std::string & name, bool ii); + static void clearCache(); friend class SourceObject; mutable std::map<std::string, SourceObject *> namedComponents; diff --git a/project2/ice/iceDaemon.cpp b/project2/ice/iceDaemon.cpp index 7f506d4..b9211f9 100644 --- a/project2/ice/iceDaemon.cpp +++ b/project2/ice/iceDaemon.cpp @@ -3,6 +3,7 @@ #include "buildComms.h" #include "buildDaemon.h" #include "iceViewSerializer.h" +#include <scripts.h> #include <scriptLoader.h> #include <options.h> #include <sys/stat.h> @@ -180,6 +181,7 @@ IceDaemon::GetComponentCompiler(const std::string & slice, const IceCompile::Dep void IceDaemon::ClearSlice() { + ScriptReader::clearCache(); libs.clear(); } diff --git a/project2/ice/iceDataSource.cpp b/project2/ice/iceDataSource.cpp index c3d5b36..1b0c9e8 100644 --- a/project2/ice/iceDataSource.cpp +++ b/project2/ice/iceDataSource.cpp @@ -1,6 +1,7 @@ #include <pch.hpp> #include "buildClient.h" #include "iceDataSource.h" +#include <scripts.h> #include <Ice/Ice.h> IceBase::Libs IceDataSource::libs; @@ -33,6 +34,7 @@ IceDataSource::GetComponentCompiler(const std::string & slice, const IceCompile: void IceDataSource::ClearSlice() { + ScriptReader::clearCache(); libs.clear(); proxies.clear(); } |