- Timestamp:
- 10/01/21 10:40:31 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp
r2241 r2243 175 175 176 176 #endif 177 178 // Delete CContext179 xios_map<StdString, xios_map<StdString, std::shared_ptr<CContext> > >* contextMap = CObjectTemplate<CContext>::GetAllMapobject();180 for(auto it = contextMap->begin(); it != contextMap->end(); ++it)181 {182 for(auto it2 = it->second.begin(); it2 != it->second.end(); ++it2)183 {184 std::shared_ptr<CContext> todel = it2->second;185 todel.reset();186 }187 it->second.clear();188 189 std::vector<std::shared_ptr<CContext> >* contextVect = CObjectTemplate<CContext>::GetAllVectobjectPtr(it->first);190 for(auto it = contextVect->begin(); it != contextVect->end(); ++it)191 {192 it->reset();193 }194 contextVect->clear();195 196 }197 contextMap->clear();198 199 177 } 200 178 … … 247 225 report(0)<<CMemChecker::getAllCumulatedMem() ; 248 226 CServer::closeInfoStream(); 249 250 // Delete CContext251 xios_map<StdString, xios_map<StdString, std::shared_ptr<CContext> > >* contextMap = CObjectTemplate<CContext>::GetAllMapobject();252 for(auto it = contextMap->begin(); it != contextMap->end(); ++it)253 {254 for(auto it2 = it->second.begin(); it2 != it->second.end(); ++it2)255 {256 std::shared_ptr<CContext> todel = it2->second;257 todel.reset();258 }259 it->second.clear();260 261 std::vector<std::shared_ptr<CContext> >* contextVect = CObjectTemplate<CContext>::GetAllVectobjectPtr(it->first);262 for(auto it = contextVect->begin(); it != contextVect->end(); ++it)263 {264 it->reset();265 }266 contextVect->clear();267 268 }269 contextMap->clear();270 227 } 271 228 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/interface/c/icdata.cpp
r2121 r2243 146 146 CTimer::get("XIOS finalize").resume(); 147 147 CXios::clientFinalize(); 148 // Delete CContext 149 CObjectTemplate<CContext>::cleanStaticDataStructure(); 148 150 } 149 151 CATCH_DUMP_STACK -
XIOS/dev/dev_ym/XIOS_COUPLING/src/object_template.hpp
r2241 r2243 69 69 static std::vector<std::shared_ptr<DerivedType> > & 70 70 GetAllVectobject(const StdString & contextId); 71 static std::vector<std::shared_ptr<DerivedType> > *72 GetAllVectobjectPtr(const StdString & contextId);73 74 static xios_map<StdString, xios_map<StdString, std::shared_ptr<DerivedType> > >*75 GetAllMapobject();76 77 71 78 72 /// Destructeur /// 79 73 virtual ~CObjectTemplate(void); 74 75 static void cleanStaticDataStructure(void); 80 76 81 77 static bool has(const string& id) ; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/object_template_impl.hpp
r2241 r2243 68 68 return (CObjectTemplate<T>::AllVectObj[contextId]); 69 69 } 70 template <class T> 71 std::vector<std::shared_ptr<T> > * 72 CObjectTemplate<T>::GetAllVectobjectPtr(const StdString & contextId) 73 { 74 return &(CObjectTemplate<T>::AllVectObj[contextId]); 75 } 76 77 template <class T> 78 xios_map<StdString, xios_map<StdString, std::shared_ptr<T> > >* 79 CObjectTemplate<T>::GetAllMapobject() 80 { 81 return &(CObjectTemplate<T>::AllMapObj); 70 71 template <class T> 72 void CObjectTemplate<T>::cleanStaticDataStructure(void) 73 { 74 xios_map<StdString, xios_map<StdString, std::shared_ptr<T> > >* allMap = &(CObjectTemplate<T>::AllMapObj); 75 for(auto it = allMap->begin(); it != allMap->end(); ++it) 76 { 77 for(auto it2 = it->second.begin(); it2 != it->second.end(); ++it2) 78 { 79 std::shared_ptr<T> todel = it2->second; 80 todel.reset(); 81 } 82 it->second.clear(); 83 84 std::vector<std::shared_ptr<T> >* allVect = &(CObjectTemplate<T>::AllVectObj[it->first]); 85 for(auto it = allVect->begin(); it != allVect->end(); ++it) 86 { 87 it->reset(); 88 } 89 allVect->clear(); 90 } 91 allMap->clear(); 82 92 } 83 93 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/server.cpp
r2242 r2243 205 205 } 206 206 CTimer::get("XIOS event loop").suspend() ; 207 208 // Delete CContext 209 CObjectTemplate<CContext>::cleanStaticDataStructure(); 207 210 } 208 211
Note: See TracChangeset
for help on using the changeset viewer.