Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp	(revision 2274)
@@ -17,4 +17,5 @@
 #include <cstdio>
 #include "workflow_graph.hpp"
+#include "release_static_allocation.hpp"
 
 namespace xios
@@ -422,5 +423,5 @@
 
       getPoolRessource()->createService(contextComm, id, 0, CServicesManager::CLIENT, 1) ;
-      getPoolRessource()->createService(contextComm, CXios::defaultServerId, 0, CServicesManager::IO_SERVER, 1) ;
+      getPoolRessource()->createService(contextComm, id+"_"+CXios::defaultServerId, 0, CServicesManager::IO_SERVER, 1) ;
 
       if (commRank==0) while (!CXios::getServicesManager()->hasService(getPoolRessource()->getId(), id, 0)) { CXios::getDaemonsManager()->eventLoop();}
@@ -488,6 +489,7 @@
       CTimer::get("XIOS").suspend() ;
       CXios::finalizeDaemonsManager() ;
+      finalizePoolRessource() ;
       CContext::removeAllContexts() ; // free memory for related context 
-     
+
 
       if (!is_MPI_Initialized)
@@ -507,8 +509,14 @@
       report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ;
       report(100)<<CTimer::getAllCumulatedTime()<<endl ;
+      CWorkflowGraph::drawWorkFlowGraph_client();
+
+      xios::releaseStaticAllocation() ;
+
+    }
     
-      CWorkflowGraph::drawWorkFlowGraph_client();
-    }
-    
+    void CClient::finalizePoolRessource() 
+    { 
+      delete poolRessource_ ; poolRessource_=nullptr ;
+    }
 
     /*!
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/client.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/client.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/client.hpp	(revision 2274)
@@ -45,4 +45,5 @@
         static void closeErrorStream();
         static CPoolRessource* getPoolRessource(void) { return poolRessource_ ; }
+        static void finalizePoolRessource() ;
 
         static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp	(revision 2274)
@@ -306,5 +306,4 @@
   }
   
-
   CPoolRessource* CXios::getPoolRessource(void)
   {
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/event_scheduler.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/event_scheduler.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/event_scheduler.cpp	(revision 2274)
@@ -70,5 +70,8 @@
   CEventScheduler::~CEventScheduler()
   {
-
+    while (!pendingSentParentRequest.empty() || !pendingRecvParentRequest.empty() || !pendingRecvChildRequest.empty() ||  !pendingSentChildRequest.empty())
+    {
+      checkEvent() ;
+    } 
   } 
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/group_factory.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/group_factory.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/group_factory.hpp	(revision 2274)
@@ -18,4 +18,5 @@
          /// Mutateurs ///
          static void SetCurrentContextId(const StdString & context);
+         static void clearCurrentContextId() {CurrContext.clear(); CurrContext.shrink_to_fit();} 
 
          template <typename U>
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/inetcdf4.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/inetcdf4.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/inetcdf4.cpp	(revision 2274)
@@ -763,5 +763,5 @@
       {
         StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path);
-        if (CCFConvention::XIOS_CF_Longitude_units.end() != CCFConvention::XIOS_CF_Longitude_units.find(unit))
+        if (CCFConvention::XIOS_CF_Longitude_units().end() != CCFConvention::XIOS_CF_Longitude_units().find(unit))
         {
           lonName = *itList;
@@ -785,5 +785,5 @@
       {
         StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path);
-        if (CCFConvention::XIOS_CF_Latitude_units.end() != CCFConvention::XIOS_CF_Latitude_units.find(unit))
+        if (CCFConvention::XIOS_CF_Latitude_units().end() != CCFConvention::XIOS_CF_Latitude_units().find(unit))
         {
           latName = *itList;
@@ -811,6 +811,6 @@
     {
       StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &varname, path);
-      return      (CCFConvention::XIOS_CF_Latitude_units.end() != CCFConvention::XIOS_CF_Latitude_units.find(unit)
-                || CCFConvention::XIOS_CF_Longitude_units.end() != CCFConvention::XIOS_CF_Longitude_units.find(unit));
+      return      (CCFConvention::XIOS_CF_Latitude_units().end() != CCFConvention::XIOS_CF_Latitude_units().find(unit)
+                || CCFConvention::XIOS_CF_Longitude_units().end() != CCFConvention::XIOS_CF_Longitude_units().find(unit));
     }
     else return false ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.cpp	(revision 2274)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.cpp	(revision 2274)
@@ -0,0 +1,11 @@
+#include "netCdf_cf_constant.hpp"
+
+namespace xios
+{
+  std::set<StdString> CCFConvention::XIOS_CF_Latitude_units_;
+  std::set<StdString> CCFConvention::XIOS_CF_Longitude_units_;
+  const StdString CCFKeywords::XIOS_CF_units("units");
+  const StdString CCFKeywords::XIOS_CF_standard_name("standard_name");
+  const StdString CCFKeywords::XIOS_CF_coordinates("coordinates");
+  const StdString CCFKeywords::XIOS_CF_bounds("bounds");
+}
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.hpp	(revision 2274)
@@ -7,6 +7,6 @@
 namespace xios
 {
-const StdString CFLatUnits[] = {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"};
-const StdString CFLonUnits[] = {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"};
+//const StdString CFLatUnits[] = {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"};
+//const StdString CFLonUnits[] = {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"};
 
 struct CCFKeywords
@@ -17,20 +17,24 @@
   static const StdString XIOS_CF_bounds;
 };
-const StdString CCFKeywords::XIOS_CF_units("units");
-const StdString CCFKeywords::XIOS_CF_standard_name("standard_name");
-const StdString CCFKeywords::XIOS_CF_coordinates("coordinates");
-const StdString CCFKeywords::XIOS_CF_bounds("bounds");
 
 struct CCFConvention
 {
-  static const std::set<StdString> XIOS_CF_Latitude_units;
-  static const std::set<StdString> XIOS_CF_Longitude_units;
+  static const std::set<StdString>& XIOS_CF_Latitude_units()
+  {
+    if (XIOS_CF_Longitude_units_.empty()) XIOS_CF_Latitude_units_= {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"};
+    return XIOS_CF_Latitude_units_ ;
+  }
 
+  static const std::set<StdString>& XIOS_CF_Longitude_units()
+  {
+    if (XIOS_CF_Longitude_units_.empty()) XIOS_CF_Longitude_units_= {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"};
+    return XIOS_CF_Longitude_units_ ;
+  }
+  static void releaseStaticAllocation(void) { XIOS_CF_Latitude_units_.clear() ; XIOS_CF_Longitude_units_.clear() ; }
 private:
   CCFConvention();
+  static std::set<StdString> XIOS_CF_Latitude_units_;
+  static std::set<StdString> XIOS_CF_Longitude_units_;
 };
-
-const std::set<StdString> CCFConvention::XIOS_CF_Latitude_units(CFLatUnits, CFLatUnits+sizeof(CFLatUnits)/sizeof(CFLatUnits[0]));
-const std::set<StdString> CCFConvention::XIOS_CF_Longitude_units(CFLonUnits, CFLonUnits+sizeof(CFLonUnits)/sizeof(CFLonUnits[0]));
 
 } // namespace xios
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.cpp	(revision 2274)
@@ -118,4 +118,5 @@
       if (it->second->eventLoop(serviceOnly))
       {
+        delete it->second ;
         services_.erase(it) ;
         // don't forget to free service later
@@ -196,5 +197,10 @@
     finalizeSignal_=true ;
     for (auto it=services_.begin(); it!=services_.end() ; ++it) it->second->finalizeSignal() ;
-  }
-
+  }  
+  
+  CPoolRessource::~CPoolRessource()
+  {
+    delete winNotify_ ;
+    for(auto& service : services_) delete service.second ;
+  }
 }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/pool_ressource.hpp	(revision 2274)
@@ -23,4 +23,5 @@
    public:
     CPoolRessource(MPI_Comm poolComm, const std::string& Id) ;
+    ~CPoolRessource() ;
     
     void createService(const std::string& serviceId, int type, int size, int nbPartition) ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp	(revision 2274)
@@ -54,5 +54,5 @@
   CServerContext::~CServerContext()
   {
-
+    cout<<"Server Context destructor"<<endl;
   } 
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.hpp	(revision 2274)
@@ -19,4 +19,5 @@
                   const int& partitionId, const std::string& contextId) ;
     ~CServerContext() ;
+    static void releaseStaticAllocation(void) { overlapedComm_.clear() ;}
 
     bool createIntercomm(const string& poolId, const string& serviceId, const int& partitionId, const string& contextId, 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.cpp	(revision 2274)
@@ -131,4 +131,5 @@
       if (poolRessource_->eventLoop(serviceOnly))
       {
+        delete poolRessource_ ;
         poolRessource_=nullptr ;
         // don't forget to free pool ressource later
@@ -188,3 +189,8 @@
     else return false ;
   }
+
+  CServersRessource::~CServersRessource()
+  {
+    delete winNotify_ ;
+  }
 }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/servers_ressource.hpp	(revision 2274)
@@ -24,4 +24,5 @@
     
     CServersRessource(MPI_Comm serverComm) ;
+    ~CServersRessource() ;
     void createPool(const string& poolId, const int size) ;
     void createPool(void) ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp	(revision 2274)
@@ -42,4 +42,12 @@
     name_= poolId+"::"+serviceId+"_"+oss.str();
   }
+
+  CService::~CService()
+  {
+    delete eventScheduler_ ;
+    delete winNotify_ ;
+    for(auto& it : contexts_) delete it.second ;
+  }
+
 
   void CService::createContext( const std::string& poolId, const std::string& serviceId, const int& partitionId, const std::string& contextId)
@@ -121,4 +129,5 @@
       if (it->second->eventLoop(serviceOnly))
       {
+        delete it->second ; 
         contexts_.erase(it) ;
         // destroy server_context -> to do later
@@ -235,8 +244,8 @@
      auto& arg=notifyInCreateContext_ ;
      string poolId = get<0>(arg) ;
-     string& serviceId = get<1>(arg) ;
+     string serviceId = get<1>(arg) ;
      int partitionId = get<2>(arg) ;
      string contextId = get<3>(arg) ;
-     contexts_[contextId] = new CServerContext(this, serviceComm_, poolId, serviceId, partitionId, contextId) ; 
+     contexts_[contextId] = new CServerContext(this, serviceComm_, poolId, serviceId, partitionId, contextId) ;
    }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.hpp	(revision 2274)
@@ -21,4 +21,6 @@
     CService(MPI_Comm serviceComm, const std::string& poolId, const std::string& serviceId, const int& partitionId, 
              int type, int nbPartitions) ;
+    ~CService() ;
+
     bool eventLoop(bool serviceOnly=false) ;
     void createContext(const std::string& poolId, const std::string& serviceId, const int& partitionId, const std::string& contextId) ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/mem_checker.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/mem_checker.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/mem_checker.hpp	(revision 2274)
@@ -20,4 +20,5 @@
       static void disable(void) { enabled_=false ;}
       static void enable(void) {enabled_=true ;}
+      static void release(void) {allMemChecker_.clear();}
     private:
       static void check(void) ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp	(revision 2274)
@@ -494,5 +494,5 @@
         }
         
-        //xios::CAddr2line myaddr2line ;
+        xios::CAddr2line myaddr2line ;
         size_t i = 0 ;
         for(auto& it : orderedBlocks)
@@ -510,6 +510,6 @@
             sprintf(strbuff,"... %s:%d\n", fileName, lineNum);
             memReport<<strbuff ;
-            //pBlockHeader->backTrace(memReport, myaddr2line);
-            pBlockHeader->backTrace(memReport);
+            pBlockHeader->backTrace(memReport, myaddr2line);
+            //pBlockHeader->backTrace(memReport);
             i++ ;
         }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp	(revision 2274)
@@ -59,4 +59,11 @@
    }
    CATCH
+   
+   void CAxis::releaseStaticAllocation(void)
+   {
+     transformationMapList_.clear() ;
+     CTransformation<CAxis>::unregisterAllTransformations() ;
+     CGridTransformationFactory<CAxis>::unregisterAllTransformations() ;
+   }
 
    ///---------------------------------------------------------------
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp	(revision 2274)
@@ -23,4 +23,5 @@
 #include "distribution_type.hpp"
 #include "generic_algorithm_transformation.hpp"
+#include "grid_transformation_factory_impl.hpp"
 
 
@@ -68,4 +69,5 @@
          CAxis(const CAxis & axis);       // Not implemented yet.
          CAxis(const CAxis * const axis); // Not implemented yet.
+         static void releaseStaticAllocation(void) ; // release static allocation on heap
 
          static CAxis* createAxis();
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp	(revision 2274)
@@ -63,5 +63,6 @@
      for (std::vector<CContextClient*>::iterator it = clientPrimServer.begin(); it != clientPrimServer.end(); it++)  delete *it;
      for (std::vector<CContextServer*>::iterator it = serverPrimServer.begin(); it != serverPrimServer.end(); it++)  delete *it;
-
+     if (registryIn!=nullptr) delete registryIn ;
+     if (registryOut!=nullptr) delete registryOut ;
    }
 
@@ -100,4 +101,14 @@
    CATCH
 
+   void CContext::releaseStaticAllocation(void)
+   TRY
+   {
+      CDomain::releaseStaticAllocation();
+      CAxis::releaseStaticAllocation();
+      CScalar::releaseStaticAllocation();
+      if (root) root.reset() ;
+   }
+   CATCH
+   
    //----------------------------------------------------------------
 
@@ -326,4 +337,8 @@
   #include "node_type.conf"
 */
+  CObjectFactory::deleteAllContexts<CContext>() ;
+  CObjectFactory::deleteAllContexts<CContextGroup>() ;
+  CObjectFactory::clearCurrentContextId();
+  CGroupFactory::clearCurrentContextId();
 }
    ///---------------------------------------------------------------
@@ -538,5 +553,5 @@
       if (commRank==0)
       {
-        if (attached_mode) CXios::getContextsManager()->createServerContext(CClient::getPoolRessource()->getId(), CXios::defaultServerId, 0, getContextId()) ;
+        if (attached_mode) CXios::getContextsManager()->createServerContext(CClient::getPoolRessource()->getId(), getContextId()+"_"+CXios::defaultServerId, 0, getContextId()) ;
         else if (CXios::usingServer2) CXios::getContextsManager()->createServerContext(CXios::defaultPoolId, CXios::defaultGathererId, 0, getContextId()) ;
         else  CXios::getContextsManager()->createServerContext(CXios::defaultPoolId, CXios::defaultServerId, 0, getContextId()) ;
@@ -547,5 +562,5 @@
       if (attached_mode)
       {
-        parentServerContext_->createIntercomm(CClient::getPoolRessource()->getId(), CXios::defaultServerId, 0, getContextId(), intraComm_, 
+        parentServerContext_->createIntercomm(CClient::getPoolRessource()->getId(), getContextId()+"_"+CXios::defaultServerId, 0, getContextId(), intraComm_, 
                                               interCommClient, interCommServer) ;
         int type ; 
@@ -811,4 +826,5 @@
         closeAllFile();
         client->releaseBuffers();
+        server->releaseBuffers();
       }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp	(revision 2274)
@@ -82,4 +82,6 @@
          /// Destructeur ///
          virtual ~CContext(void);
+
+         static void releaseStaticAllocation(void) ;
 
          //---------------------------------------------------------
@@ -229,5 +231,5 @@
         // Get context root
         static CContextGroup* getRoot(void);
-
+       
         // Set current context
         static void setCurrent(const string& id);
@@ -329,6 +331,6 @@
          std::vector<std::string> primServerId_;
 
-         CRegistry* registryIn ;    //!< input registry which is read from file
-         CRegistry* registryOut ;   //!< output registry which will be written into file at the finalize
+         CRegistry* registryIn=nullptr ;    //!< input registry which is read from file
+         CRegistry* registryOut=nullptr ;   //!< output registry which will be written into file at the finalize
 
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp	(revision 2274)
@@ -25,4 +25,5 @@
 #include "grid_gatherer_connector.hpp"
 #include "transformation_path.hpp"
+#include "grid_transformation_factory_impl.hpp"
 
 #include <algorithm>
@@ -62,4 +63,10 @@
    }
 
+   void CDomain::releaseStaticAllocation(void)
+   {
+     transformationMapList_.clear() ;
+     CTransformation<CDomain>::unregisterAllTransformations() ;
+     CGridTransformationFactory<CDomain>::unregisterAllTransformations() ;
+   }
    ///---------------------------------------------------------------
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp	(revision 2274)
@@ -71,5 +71,6 @@
          CDomain(const CDomain & domain);       // Not implemented yet.
          CDomain(const CDomain * const domain); // Not implemented yet.
-       
+         static void releaseStaticAllocation(void) ; // release static allocation on heap
+
          static CDomain* createDomain();
          static CDomain* get(const string& id, bool noError=false) ; //<! return domain pointer using id
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp	(revision 2274)
@@ -32,4 +32,11 @@
   { /* Ne rien faire de plus */ }
 
+  void CScalar::releaseStaticAllocation(void)
+  {
+    transformationMapList_.clear() ;
+    CTransformation<CScalar>::unregisterAllTransformations() ;
+    CGridTransformationFactory<CScalar>::unregisterAllTransformations() ;
+  }
+  
   std::map<StdString, ETranformationType> CScalar::transformationMapList_ = std::map<StdString, ETranformationType>();
   bool CScalar::dummyTransformationMapList_ = CScalar::initializeTransformationMap(CScalar::transformationMapList_);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp	(revision 2274)
@@ -20,4 +20,5 @@
 #include "distribution_type.hpp"
 #include "generic_algorithm_transformation.hpp"
+#include "grid_transformation_factory_impl.hpp"
 
 
@@ -67,5 +68,6 @@
       CScalar(const CScalar & var);       // Not implemented yet.
       CScalar(const CScalar * const var); // Not implemented yet.
-
+      static void releaseStaticAllocation(void) ; // release static allocation on heap
+      
       /// Destructeur ///
       virtual ~CScalar(void);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/object_factory.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/object_factory.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/object_factory.hpp	(revision 2274)
@@ -21,4 +21,5 @@
          /// Accesseurs ///
          static StdString & GetCurrentContextId(void);
+         static void clearCurrentContextId(void) {CurrContext.clear(); CurrContext.shrink_to_fit(); }
 
          template <typename U>
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/parse_expr/operator_expr.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/parse_expr/operator_expr.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/parse_expr/operator_expr.hpp	(revision 2274)
@@ -435,7 +435,25 @@
     }
 
+    void release(void)
+    { 
+      opScalar.clear();
+      opScalarScalar.clear();
+      opScalarScalarScalar.clear();
+      opField.clear();
+      opFieldField.clear();
+      opFieldScalar.clear();
+      opScalarField.clear();
+      opScalarScalarField.clear();
+      opScalarFieldScalar.clear();
+      opScalarFieldField.clear();
+      opFieldScalarScalar.clear();
+      opFieldScalarField.clear();
+      opFieldFieldScalar.clear();
+      opFieldFieldField.clear();
+    }
   };
 
   extern COperatorExpr operatorExpr;
+
 }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/release_static_allocation.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/release_static_allocation.cpp	(revision 2274)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/release_static_allocation.cpp	(revision 2274)
@@ -0,0 +1,20 @@
+#include "release_static_allocation.hpp"
+#include "operator_expr.hpp"
+#include "netCdf_cf_constant.hpp"
+#include "context.hpp"
+#include "server_context.hpp"
+#include "timer.hpp"
+#include "mem_checker.hpp"
+
+namespace xios
+{
+  void releaseStaticAllocation(void)
+  {
+    CContext::releaseStaticAllocation() ; // free memory from static allocation
+    CCFConvention::releaseStaticAllocation() ; // free memory from static allocation
+    CServerContext::releaseStaticAllocation() ;
+    CTimer::release() ;
+    CMemChecker::release() ;
+    operatorExpr.release();
+  }  
+}
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/release_static_allocation.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/release_static_allocation.hpp	(revision 2274)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/release_static_allocation.hpp	(revision 2274)
@@ -0,0 +1,11 @@
+#ifndef __RELEASE_STATIC_ALLOCATION_HPP__
+#define __RELEASE_STATIC_ALLOCATION_HPP__
+
+namespace xios
+{
+
+  void releaseStaticAllocation(void) ;
+
+}
+
+#endif
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/server.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/server.cpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/server.cpp	(revision 2274)
@@ -21,4 +21,6 @@
 #include <cstdio>
 #include "workflow_graph.hpp"
+#include "release_static_allocation.hpp"
+
 
 
@@ -207,5 +209,5 @@
 
       // Delete CContext
-      CObjectTemplate<CContext>::cleanStaticDataStructure();
+      //CObjectTemplate<CContext>::cleanStaticDataStructure();
     }
 
@@ -314,6 +316,8 @@
 //      MPI_Comm_free(&intraComm);
       CXios::finalizeDaemonsManager();
-      CContext::removeAllContexts() ; // free memory for related context 
-      
+      finalizeServersRessource();
+      
+      CContext::removeAllContexts() ; // free memory for related context
+          
       if (!is_MPI_Initialized)
       {
@@ -325,6 +329,7 @@
       report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ;
       report(100)<<CTimer::getAllCumulatedTime()<<endl ;
-
+      
       CWorkflowGraph::drawWorkFlowGraph_server();
+      xios::releaseStaticAllocation() ; // free memory from static allocation
     }
 
@@ -420,3 +425,8 @@
       serversRessource_ = new CServersRessource(serverComm) ;
     }
+
+    void  CServer::finalizeServersRessource(void) 
+    { 
+      delete serversRessource_; serversRessource_=nullptr ;
+    }
 }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/server.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/server.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/server.hpp	(revision 2274)
@@ -67,4 +67,5 @@
         static CServersRessource* getServersRessource(void) { return serversRessource_;}
         static void launchServersRessource(MPI_Comm commServer) ;
+        static void finalizeServersRessource(void) ;
         static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
       
@@ -75,5 +76,5 @@
         static StdOFStream m_infoStream;
         static StdOFStream m_errorStream;
-        static CServersRessource* serversRessource_ ;
+        static CServersRessource* serversRessource_  ;
     };
 }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/timer.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/timer.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/timer.hpp	(revision 2274)
@@ -25,4 +25,5 @@
       static CTimer& get(std::string name, bool trace=true);
       static std::string getAllCumulatedTime(void) ;
+      static void release(void) { allTimer.clear() ;}
   };
 }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_transformation_factory_impl.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_transformation_factory_impl.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_transformation_factory_impl.hpp	(revision 2274)
@@ -60,4 +60,5 @@
   static bool unregisterTransformation(ETranformationType transType);
   static bool initializeTransformation_;
+  static void unregisterAllTransformations(void) ;
 };
 
@@ -98,5 +99,5 @@
 bool CGridTransformationFactory<T>::registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn)
 {
-  if (0 == transformationCreationCallBacks_)
+  if (nullptr == transformationCreationCallBacks_)
     transformationCreationCallBacks_ = new CallBackMap();
 
@@ -110,5 +111,15 @@
 }
 
+template<typename T>
+void CGridTransformationFactory<T>::unregisterAllTransformations(void)
+{
+  if (nullptr != transformationCreationCallBacks_) 
+  {
+    transformationCreationCallBacks_->clear() ;
+    delete transformationCreationCallBacks_;
+  }
+}
 
 }
+
 #endif // __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/transformation.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/transformation.hpp	(revision 2273)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/transformation.hpp	(revision 2274)
@@ -53,5 +53,5 @@
     public:
       virtual ~CTransformation(void) {}
-
+      static void unregisterAllTransformations();
     protected:
       typedef CTransformation<T>* (*createTransformationCallBack)(const StdString&, xml::CXMLNode*);
@@ -62,4 +62,6 @@
       static bool registerTransformation(ETranformationType transType, tuple<createTransformationCallBack,getIdTransformationCallBack> callBackFunctions);
       static bool unregisterTransformation(ETranformationType transType);
+     
+
 
     protected:
@@ -113,4 +115,14 @@
   }
 
+  template<typename T>
+  void CTransformation<T>::unregisterAllTransformations(void)
+  {
+    if (0 != callBacks_)
+    {
+      callBacks_->clear();
+      delete callBacks_ ;  
+    }
+  }
+
 } // namespace xios
 
