Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.cpp	(revision 2267)
@@ -6,5 +6,5 @@
 {
 
-  CDistributedView::CDistributedView(CDistributedElement* parent, CElementView::type, const std::map<int,CArray<int,1>>& indexView) 
+  CDistributedView::CDistributedView(shared_ptr<CDistributedElement> parent, CElementView::type, const std::map<int,CArray<int,1>>& indexView) 
                                     : globalIndex_(parent->globalIndex_), globalSize_(parent->globalSize_), localSize_(parent->localSize_) 
   {
@@ -16,5 +16,5 @@
   }
 
-  CDistributedView::CDistributedView(CDistributedElement* parent, CElementView::type, const std::map<int,CArray<bool,1>>& maskView) 
+  CDistributedView::CDistributedView(shared_ptr<CDistributedElement> parent, CElementView::type, const std::map<int,CArray<bool,1>>& maskView) 
                                     : globalIndex_(parent->globalIndex_), globalSize_(parent->globalSize_), localSize_(parent->localSize_) 
   {
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.hpp	(revision 2267)
@@ -14,6 +14,6 @@
     public:
 
-      CDistributedView(CDistributedElement* parent, CElementView::type type, const std::map<int,CArray<int,1>>& indexView) ;
-      CDistributedView(CDistributedElement* parent, CElementView::type type, const std::map<int,CArray<bool,1>>& maskView) ;
+      CDistributedView(shared_ptr<CDistributedElement> parent, CElementView::type type, const std::map<int,CArray<int,1>>& indexView) ;
+      CDistributedView(shared_ptr<CDistributedElement> parent, CElementView::type type, const std::map<int,CArray<bool,1>>& maskView) ;
       
       std::map<int,CArray<int,1>>&  getIndex(void) { return index_ ;}
@@ -48,5 +48,5 @@
     }   
 
-    void getGlobalIndex(int rank, vector<size_t>& globalIndex, size_t sliceIndex, size_t* sliceSize, CDistributedView** view, int pos)
+    void getGlobalIndex(int rank, vector<size_t>& globalIndex, size_t sliceIndex, size_t* sliceSize, shared_ptr<CDistributedView>* view, int pos)
     {
       // using map can be expensive, find an otherway later
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/element.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/element.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/element.cpp	(revision 2267)
@@ -28,10 +28,10 @@
   void CDistributedElement::addView(CElementView::type type, std::map<int, CArray<int,1>>& indexView)
   {
-    views_[type] = new CDistributedView(this, type, indexView) ;
+    views_[type] = make_shared<CDistributedView>(shared_from_this(), type, indexView) ;
   } 
 
   void CDistributedElement::addView(CElementView::type type, std::map<int, CArray<bool,1>>& maskView)
   {
-    views_[type] = new CDistributedView(this, type, maskView) ;
+    views_[type] = make_shared<CDistributedView>(shared_from_this(), type, maskView) ;
   } 
 
@@ -120,10 +120,10 @@
   void CLocalElement::addView(CElementView::type type, CArray<int,1>& indexView)
   {
-    views_[type] = new CLocalView(this, type, indexView) ;
+    views_[type] = make_shared<CLocalView>(static_pointer_cast<CLocalElement>(shared_from_this()), type, indexView) ;
   } 
 
   void CLocalElement::addView(CElementView::type type, CArray<bool,1>& maskView)
   {
-    views_[type] = new CLocalView(this, type, maskView) ;
+    views_[type] = make_shared<CLocalView>(static_pointer_cast<CLocalElement>(shared_from_this()), type, maskView) ;
   } 
 
@@ -137,5 +137,11 @@
   } 
 
-  CLocalConnector* CLocalElement::getConnector(CElementView::type srcType, CElementView::type dstType) 
+  shared_ptr<CLocalView> CLocalElement::getView(CElementView::type type) 
+  { 
+    if (views_[(size_t)type]==nullptr) { ERROR("CLocalElement::getView(CElementView::type type)",<<"View is not initialized");} 
+    else return static_pointer_cast<CLocalView>(views_[(size_t)type]) ;
+  }
+
+  shared_ptr<CLocalConnector> CLocalElement::getConnector(CElementView::type srcType, CElementView::type dstType) 
   { 
     auto newPair = pair<CElementView::type,CElementView::type>(srcType,dstType);
@@ -143,5 +149,5 @@
     if (it==connectors_.end()) 
     {
-      auto insertPair=pair<pair<CElementView::type,CElementView::type>, CLocalConnector*>(newPair,new CLocalConnector(getView(srcType),getView(dstType))) ;
+      auto insertPair=pair<pair<CElementView::type,CElementView::type>, shared_ptr<CLocalConnector>>(newPair,make_shared<CLocalConnector>(getView(srcType),getView(dstType))) ;
       it=connectors_.insert(insertPair).first ;
       it->second->computeConnector() ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/element.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/element.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/element.hpp	(revision 2267)
@@ -15,5 +15,5 @@
   class CLocalConnector ;
 
-  class CDistributedElement
+  class CDistributedElement : public std::enable_shared_from_this<CDistributedElement>
   {
 
@@ -22,5 +22,5 @@
     std::map<int, int> localSize_ ;
     size_t globalSize_ ;
-    std::vector<CDistributedView*> views_= std::vector<CDistributedView*>(CElementView::numViewType_) ;
+    std::vector<shared_ptr<CDistributedView>> views_= std::vector<shared_ptr<CDistributedView>>(CElementView::numViewType_) ;
     CDistributedElement(void) {} ;
     
@@ -34,5 +34,5 @@
     std::map<int, CArray<size_t,1>>& getGlobalIndex(void) { return globalIndex_;}
     
-    CDistributedView* getView(CElementView::type type) 
+    shared_ptr<CDistributedView> getView(CElementView::type type) 
     { 
       if (views_[(size_t)type]==nullptr) { ERROR("CDistributedElement::getView(CElementView::type type)",<<"View is not initialized");} 
@@ -51,5 +51,5 @@
   {
     // keep local connector inside    
-      std::map<pair<CElementView::type,CElementView::type>, CLocalConnector*> connectors_  ;
+      std::map<pair<CElementView::type,CElementView::type>, shared_ptr<CLocalConnector>> connectors_  ;
  
     public: 
@@ -61,11 +61,12 @@
       void addView(CElementView::type type, CArray<bool,1>& maskView) ;
       void addFullView(void) ;
-      CLocalView* getView(CElementView::type type) 
-      { 
+      
+      shared_ptr<CLocalView> getView(CElementView::type type) ;
+ /*     { 
         if (views_[(size_t)type]==nullptr) { ERROR("CLocalElement::getView(CElementView::type type)",<<"View is not initialized");} 
-        else return (CLocalView*) views_[(size_t)type] ; 
+        else return static_pointer_cast<CLocalView>(views_[(size_t)type]) ;
       }
-      
-      CLocalConnector* getConnector(CElementView::type srcType, CElementView::type dstType) ;
+*/      
+      shared_ptr<CLocalConnector> getConnector(CElementView::type srcType, CElementView::type dstType) ;
 
     private :
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/gatherer_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/gatherer_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/gatherer_connector.hpp	(revision 2267)
@@ -17,6 +17,6 @@
   {
     private:
-      CDistributedView* srcView_;
-      CLocalView* dstView_;
+      shared_ptr<CDistributedView> srcView_;
+      shared_ptr<CLocalView> dstView_;
       map<int, vector<int>> connector_ ;
       map<int, vector<bool>> mask_ ;  // mask is on src view
@@ -25,5 +25,5 @@
 
     public:
-      CGathererConnector(CDistributedView* srcView, CLocalView* dstView) : srcView_(srcView), dstView_(dstView) {} ;
+      CGathererConnector(shared_ptr<CDistributedView> srcView, shared_ptr<CLocalView> dstView) : srcView_(srcView), dstView_(dstView) {} ;
       void computeConnector(void) ;
       
@@ -75,5 +75,5 @@
 
       template<typename T>
-      void transfer(int rank,  CGathererConnector** connectors, int nConnectors, const T* input, T* output)
+      void transfer(int rank,  shared_ptr<CGathererConnector>* connectors, int nConnectors, const T* input, T* output)
       {
         auto& connector = connector_[rank] ; // probably costly, find a better way to avoid the map
@@ -111,5 +111,5 @@
 
       // hook for transfering mask in grid connector, maybe find an other way to doing that...
-      void transfer_or(int rank,  CGathererConnector** connectors, int nConnectors, const bool* input, bool* output)
+      void transfer_or(int rank,  shared_ptr<CGathererConnector>* connectors, int nConnectors, const bool* input, bool* output)
       {
         auto& connector = connector_[rank] ; // probably costly, find a better way to avoid the map
@@ -210,8 +210,8 @@
       }
 
-    int getSrcSliceSize(int rank, CGathererConnector** connectors, int nConnectors) 
+    int getSrcSliceSize(int rank, shared_ptr<CGathererConnector>* connectors, int nConnectors) 
     { if (nConnectors==0) return srcSize_[rank] ; else return srcSize_[rank] * (*(connectors-1))->getSrcSliceSize(rank, connectors-1,nConnectors-1) ; }
 
-    int getDstSliceSize(CGathererConnector** connectors, int nConnectors) 
+    int getDstSliceSize(shared_ptr<CGathererConnector>* connectors, int nConnectors) 
     { if (nConnectors==0) return dstSize_ ; else return dstSize_ * (*(connectors-1))->getDstSliceSize(connectors-1,nConnectors-1) ; }
   
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.cpp	(revision 2267)
@@ -10,5 +10,6 @@
    * \param remoteSize Size of the remote communicator
    */ 
-  CGridClientServerRemoteConnector::CGridClientServerRemoteConnector(vector<CLocalView*>& srcFullView, vector<CLocalView*>& srcWorkflowView, vector<CDistributedView*>& dstView, MPI_Comm localComm, int remoteSize) 
+  CGridClientServerRemoteConnector::CGridClientServerRemoteConnector( vector<shared_ptr<CLocalView> >& srcFullView, vector<shared_ptr<CLocalView>>& srcWorkflowView, 
+                                                                      vector<shared_ptr<CDistributedView>>& dstView, MPI_Comm localComm, int remoteSize) 
                        : CGridRemoteConnector(srcFullView, dstView, localComm, remoteSize) , srcWorkflowView_(srcWorkflowView)
   {}
@@ -17,14 +18,14 @@
   void CGridClientServerRemoteConnector::computeConnector(void)
   {
-    CGridRemoteConnector workflowRemoteConnector(srcWorkflowView_,dstView_,localComm_,remoteSize_) ;
-    workflowRemoteConnector.computeConnector() ;
+    auto workflowRemoteConnector=make_shared<CGridRemoteConnector>(srcWorkflowView_,dstView_,localComm_,remoteSize_) ;
+    workflowRemoteConnector->computeConnector() ;
     computeViewDistribution() ;
     
-    for(int i=0;i<srcView_.size();i++) isSrcViewDistributed_[i] =  isSrcViewDistributed_[i] || workflowRemoteConnector.getIsSrcViewDistributed()[i]  ;
+    for(int i=0;i<srcView_.size();i++) isSrcViewDistributed_[i] =  isSrcViewDistributed_[i] || workflowRemoteConnector->getIsSrcViewDistributed()[i]  ;
     computeConnectorMethods() ;
     computeRedondantRanks() ;
 
     for(auto& rank : rankToRemove_)
-      if (workflowRemoteConnector.getRankToRemove().count(rank)!=0)
+      if (workflowRemoteConnector->getRankToRemove().count(rank)!=0)
         for(auto& element : elements_) element.erase(rank) ;
   }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.hpp	(revision 2267)
@@ -12,7 +12,7 @@
     public:
 
-      CGridClientServerRemoteConnector(vector<CLocalView*>& srcView, vector<CLocalView*>& worflowSrcView, vector<CDistributedView*>& dstView, MPI_Comm localComm, int remoteSize) ;
+      CGridClientServerRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CLocalView>>& worflowSrcView, vector<shared_ptr<CDistributedView>>& dstView, MPI_Comm localComm, int remoteSize) ;
       void computeConnector(void) ;
-      vector<CLocalView*> srcWorkflowView_ ;   
+      vector<shared_ptr<CLocalView>> srcWorkflowView_ ;   
   } ;
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.cpp	(revision 2267)
@@ -6,11 +6,11 @@
 {
 
-  CGridLocalView* CGridLocalElements::getView(CElementView::type type)
+  shared_ptr<CGridLocalView> CGridLocalElements::getView(CElementView::type type)
   { 
-    if (views_[type]==nullptr) views_[type] = new CGridLocalView(this, type) ;
+    if (views_[type]==nullptr) views_[type] = make_shared<CGridLocalView>(shared_from_this(), type) ;
     return views_[type] ;
   }
   
-  CGridLocalConnector* CGridLocalElements::getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask)
+  shared_ptr<CGridLocalConnector> CGridLocalElements::getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask)
   {
     auto newPair = pair<CElementView::type,CElementView::type>(srcType,dstType);
@@ -18,5 +18,5 @@
     if (it==connectors_.end()) 
     {
-      auto insertPair=pair<pair<CElementView::type,CElementView::type>, CGridLocalConnector*>(newPair,new CGridLocalConnector(this, srcType, dstType, withMask)) ;
+      auto insertPair=pair<pair<CElementView::type,CElementView::type>, shared_ptr<CGridLocalConnector>>(newPair, make_shared<CGridLocalConnector>(shared_from_this(), srcType, dstType, withMask)) ;
       it=connectors_.insert(insertPair).first ;
     }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.hpp	(revision 2267)
@@ -11,22 +11,22 @@
   class CGridLocalConnector ;
 
-  class CGridLocalElements  
+  class CGridLocalElements : public std::enable_shared_from_this<CGridLocalElements>
   {
     private:
-      std::vector<CLocalElement*> elements_ ;
-      std::vector<CGridLocalView*> views_= std::vector<CGridLocalView*>(CElementView::numViewType_) ;
-      std::map<pair<CElementView::type,CElementView::type>, CGridLocalConnector*> connectors_ ;
+      std::vector<shared_ptr<CLocalElement>> elements_ ;
+      std::vector<shared_ptr<CGridLocalView>> views_= std::vector<shared_ptr<CGridLocalView>>(CElementView::numViewType_) ;
+      std::map<pair<CElementView::type,CElementView::type>, shared_ptr<CGridLocalConnector>> connectors_ ;
       vector<bool> localMask_ ;
   
     public:
-      CGridLocalElements(vector<CLocalElement*> elements) : elements_(elements) {}
-      CGridLocalElements(vector<CLocalElement*> elements, vector<bool>& localMask) : elements_(elements), localMask_(localMask) {}
+      CGridLocalElements(vector<shared_ptr<CLocalElement> > elements) : elements_(elements) {}
+      CGridLocalElements(vector<shared_ptr<CLocalElement>> elements, vector<bool>& localMask) : elements_(elements), localMask_(localMask) {}
 
       bool hasLocalMask() { return !localMask_.empty() ;}
       vector<bool>& getLocalMask(void) { return localMask_ ;}
 
-      std::vector<CLocalElement*>& getElements(void) { return elements_ ; }
-      CGridLocalView* getView(CElementView::type type) ;
-      CGridLocalConnector* getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask=false) ;
+      std::vector<shared_ptr<CLocalElement>>& getElements(void) { return elements_ ; }
+      shared_ptr<CGridLocalView> getView(CElementView::type type) ;
+      shared_ptr<CGridLocalConnector> getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask=false) ;
   } ;
 }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_gatherer_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_gatherer_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_gatherer_connector.hpp	(revision 2267)
@@ -19,9 +19,9 @@
     private:
     
-      vector<CGathererConnector*> elementsConnector_ ;
+      vector<shared_ptr<CGathererConnector>> elementsConnector_ ;
       int dstSize_ ;
 
     public:
-      CGridGathererConnector(vector<CGathererConnector*> elementsConnector) : elementsConnector_(elementsConnector)
+      CGridGathererConnector(vector<shared_ptr<CGathererConnector>> elementsConnector) : elementsConnector_(elementsConnector)
       {
         dstSize_ = 1 ;
@@ -33,5 +33,5 @@
       {
         int n = elementsConnector_.size()-1 ;
-        CGathererConnector** connector = elementsConnector_.data() + n ;
+       shared_ptr<CGathererConnector>* connector = elementsConnector_.data() + n ;
         output.resize(dstSize_) ;
         for(auto& rankDataIn : input) 
@@ -45,5 +45,5 @@
       {
         int n = elementsConnector_.size()-1 ;
-        CGathererConnector** connector = elementsConnector_.data() + n ;
+        shared_ptr<CGathererConnector>* connector = elementsConnector_.data() + n ;
         output.resize(dstSize_) ;
         output = missingValue ;
@@ -93,5 +93,5 @@
       {
         int n = elementsConnector_.size()-1 ;
-        CGathererConnector** connector = elementsConnector_.data() + n ;
+        shared_ptr<CGathererConnector>* connector = elementsConnector_.data() + n ;
         output.resize(dstSize_) ;
         output = false ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.cpp	(revision 2267)
@@ -8,5 +8,5 @@
 {
  
-  CGridLocalConnector::CGridLocalConnector(const std::vector<CLocalConnector*>& elementsConnector) : elementsConnector_(elementsConnector)
+  CGridLocalConnector::CGridLocalConnector(const std::vector<shared_ptr<CLocalConnector>>& elementsConnector) : elementsConnector_(elementsConnector)
   {
     srcSize_=1 ;
@@ -16,13 +16,13 @@
   } 
 
-  CGridLocalConnector::CGridLocalConnector(CGridLocalElements* parent, CElementView::type srcType, CElementView::type dstType, bool withMask)
+  CGridLocalConnector::CGridLocalConnector(shared_ptr<CGridLocalElements> parent, CElementView::type srcType, CElementView::type dstType, bool withMask)
   {
-    CGridLocalView* srcView=parent->getView(srcType) ;
-    CGridLocalView* dstView=parent->getView(dstType) ;
+    shared_ptr<CGridLocalView> srcView=parent->getView(srcType) ;
+    shared_ptr<CGridLocalView> dstView=parent->getView(dstType) ;
 
-    vector<CLocalView*> srcViews = srcView->getViews() ; 
-    vector<CLocalView*> dstViews = dstView->getViews() ;
+    vector<shared_ptr<CLocalView>> srcViews = srcView->getViews() ; 
+    vector<shared_ptr<CLocalView>> dstViews = dstView->getViews() ;
     
-    vector<CLocalElement*>& elements = parent->getElements();
+    vector<shared_ptr<CLocalElement>>& elements = parent->getElements();
     for(auto element : elements) elementsConnector_.push_back(element->getConnector(srcType, dstType)) ;
     srcSize_=1 ;
@@ -33,15 +33,15 @@
     if (parent->hasLocalMask() && withMask)
     {
-      vector<CLocalConnector*> elementsConnector ;
+      vector<shared_ptr<CLocalConnector>> elementsConnector ;
       for(auto element : elements) elementsConnector.push_back(element->getConnector(CElementView::FULL, dstType)) ;
-      CGridLocalConnector localToDst(elementsConnector) ;
-      CArray<bool,1> maskIn(localToDst.getSrcSize()) ;
-      CArray<bool,1> maskOut1(localToDst.getDstSize()) ;
-      CArray<bool,1> maskOut2(localToDst.getDstSize()) ;
+      auto localToDst=make_shared<CGridLocalConnector>(elementsConnector) ;
+      CArray<bool,1> maskIn(localToDst->getSrcSize()) ;
+      CArray<bool,1> maskOut1(localToDst->getDstSize()) ;
+      CArray<bool,1> maskOut2(localToDst->getDstSize()) ;
       maskIn=true ;
-      localToDst.transfer(maskIn,maskOut1,false) ;
+      localToDst->transfer(maskIn,maskOut1,false) ;
       auto& localMask = parent->getLocalMask() ;
       for(int i=0 ; i < maskIn.numElements() ; i++) maskIn(i)=localMask[i] ;
-      localToDst.transfer(maskIn,maskOut2,false) ;
+      localToDst->transfer(maskIn,maskOut2,false) ;
       mask_.assign(dstSize_,true) ;
       for(int i=0;i<dstSize_;i++) if (maskOut1(i)==true && maskOut2(i)==false) mask_[i]=false ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.hpp	(revision 2267)
@@ -17,5 +17,5 @@
 
     private:  
-      std::vector<CLocalConnector*> elementsConnector_ ;
+      std::vector<shared_ptr<CLocalConnector>> elementsConnector_ ;
       int srcSize_ ;
       int dstSize_ ;
@@ -24,6 +24,6 @@
     public:
       
-      CGridLocalConnector(const std::vector<CLocalConnector*>& elementsConnector)  ;
-      CGridLocalConnector(CGridLocalElements* parent, CElementView::type srcType, CElementView::type dstType, bool withMask=false) ;
+      CGridLocalConnector(const std::vector<shared_ptr<CLocalConnector>>& elementsConnector)  ;
+      CGridLocalConnector(shared_ptr<CGridLocalElements> parent, CElementView::type srcType, CElementView::type dstType, bool withMask=false) ;
       int getSrcSize(void) { return srcSize_ ;}
       int getDstSize(void) { return dstSize_ ;}
@@ -37,5 +37,5 @@
       {
         int n = elementsConnector_.size()-1 ;
-        CLocalConnector** connector = elementsConnector_.data() + n ;
+        shared_ptr<CLocalConnector>* connector = elementsConnector_.data() + n ;
         elementsConnector_[n]->transfer(connector, n, input.dataFirst(), output.dataFirst()) ;
       }
@@ -45,5 +45,5 @@
       {
         int n = elementsConnector_.size()-1 ;
-        CLocalConnector** connector = elementsConnector_.data() + n ;
+        shared_ptr<CLocalConnector>* connector = elementsConnector_.data() + n ;
         elementsConnector_[n]->transfer(connector, n, input.dataFirst(), output.dataFirst(), missingValue) ;
         if (!computeMask_done_) computeMask() ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_view.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_view.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_view.cpp	(revision 2267)
@@ -4,5 +4,5 @@
 namespace xios
 {
-  CGridLocalView::CGridLocalView(CGridLocalElements* parent, CElementView::type type) : localMask_(parent->getLocalMask())
+  CGridLocalView::CGridLocalView(shared_ptr<CGridLocalElements> parent, CElementView::type type) : localMask_(parent->getLocalMask())
   {
     size_ = 1 ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_view.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_view.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_view.hpp	(revision 2267)
@@ -12,12 +12,12 @@
   {
     private:
-      std::vector<CLocalView*> views_ ;
+      std::vector<shared_ptr<CLocalView>> views_ ;
       std::vector<bool>& localMask_ ;
       int size_ ;
     
     public:
-      CGridLocalView(CGridLocalElements* parent, CElementView::type type) ;
-      std::vector<CLocalView*>& getViews(void) {return views_ ;}
-      CLocalView* getView(int i) {return views_[i] ;}
+      CGridLocalView(shared_ptr<CGridLocalElements> parent, CElementView::type type) ;
+      std::vector<shared_ptr<CLocalView>>& getViews(void) {return views_ ;}
+      shared_ptr<CLocalView> getView(int i) {return views_[i] ;}
       int getSize() { return size_ ;}
   } ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_mask_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_mask_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_mask_connector.hpp	(revision 2267)
@@ -15,5 +15,5 @@
     public:
 
-      CGridMaskConnector(vector<CLocalView*>& views) : views_(views) {}
+      CGridMaskConnector(vector<shared_ptr<CLocalView>>& views) : views_(views) {}
       void computeConnector(CArray<bool,1>& mask) ;
      
@@ -22,5 +22,5 @@
     
     private:
-      vector<CLocalView*> views_ ;
+      vector<shared_ptr<CLocalView>> views_ ;
       vector<CArray<bool,1>> elementsMask_ ; 
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.cpp	(revision 2267)
@@ -15,5 +15,5 @@
    * \param remoteSize Size of the remote communicator
    */ 
-  CGridRemoteConnector::CGridRemoteConnector(vector<CLocalView*>& srcView, vector<CDistributedView*>& dstView, MPI_Comm localComm, int remoteSize) 
+  CGridRemoteConnector::CGridRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CDistributedView>>& dstView, MPI_Comm localComm, int remoteSize) 
                        : srcView_(srcView), dstView_(dstView), localComm_(localComm), remoteSize_(remoteSize) 
   {}
@@ -26,8 +26,8 @@
    * \param remoteSize Size of the remote communicator
    */ 
-  CGridRemoteConnector::CGridRemoteConnector(vector<CLocalView*>& srcView, vector<CLocalView*>& dstView, MPI_Comm localComm, int remoteSize) 
+  CGridRemoteConnector::CGridRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector< shared_ptr<CLocalView> >& dstView, MPI_Comm localComm, int remoteSize) 
                        : srcView_(srcView), localComm_(localComm), remoteSize_(remoteSize) 
   {
-    for(auto& it : dstView) dstView_.push_back((CDistributedView*) it) ; 
+    for(auto& it : dstView) dstView_.push_back((shared_ptr<CDistributedView>) it) ; 
   }
 
@@ -135,6 +135,6 @@
   void CGridRemoteConnector::computeConnectorMethods(void)
   {
-    vector<CLocalView*> srcView ;
-    vector<CDistributedView*> dstView ;
+    vector<shared_ptr<CLocalView>> srcView ;
+    vector<shared_ptr<CDistributedView>> dstView ;
     vector<int> indElements ;
     elements_.resize(srcView_.size()) ;
@@ -435,5 +435,5 @@
   *  \param indElements Index of the view making the correspondance between all views and views distributed (that are in input)
   */
-  void CGridRemoteConnector::computeGenericMethod(vector<CLocalView*>& srcView, vector<CDistributedView*>& dstView, vector<int>& indElements)
+  void CGridRemoteConnector::computeGenericMethod(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CDistributedView>>& dstView, vector<int>& indElements)
   {
     // generic method, every element can be distributed
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_remote_connector.hpp	(revision 2267)
@@ -18,10 +18,10 @@
     public:
 
-      CGridRemoteConnector(vector<CLocalView*>& srcView, vector<CDistributedView*>& dstView, MPI_Comm localComm, int remoteSize) ;
-      CGridRemoteConnector(vector<CLocalView*>& srcView, vector<CLocalView*>& dstView, MPI_Comm localComm, int remoteSize) ;
+      CGridRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CDistributedView>>& dstView, MPI_Comm localComm, int remoteSize) ;
+      CGridRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CLocalView>>& dstView, MPI_Comm localComm, int remoteSize) ;
       void computeViewDistribution(void) ;
       void computeConnector(void) ;
       void computeConnectorMethods(void) ;
-      void computeGenericMethod(vector<CLocalView*>& srcView, vector<CDistributedView*>& dstView, vector<int>& indElements) ;
+      void computeGenericMethod(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CDistributedView>>& dstView, vector<int>& indElements) ;
       void computeSrcDstNonDistributed(int i, map<int,bool>& ranks) ;
       void computeDstNonDistributed(int i, map<int,bool>& ranks) ;
@@ -39,5 +39,5 @@
      * It is feed at construction time
      */
-      vector<CLocalView*> srcView_ ;
+      vector<shared_ptr<CLocalView>> srcView_ ;
 
     /** 
@@ -45,5 +45,5 @@
      * It is feed at construction time
      */
-      vector<CDistributedView*> dstView_ ;
+      vector<shared_ptr<CDistributedView>> dstView_ ;
 
     /**  
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_scatterer_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_scatterer_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_scatterer_connector.hpp	(revision 2267)
@@ -18,5 +18,5 @@
   {
     private:
-     vector<CScattererConnector*> elementsConnector_ ;
+     vector<shared_ptr<CScattererConnector>> elementsConnector_ ;
      map<int,int> nbSenders_ ;
      vector<int> ranks_ ;
@@ -25,5 +25,5 @@
 
     public:
-      CGridScattererConnector(vector<CScattererConnector*> elementsConnector) : elementsConnector_(elementsConnector) 
+      CGridScattererConnector(vector<shared_ptr<CScattererConnector>> elementsConnector) : elementsConnector_(elementsConnector) 
       {
         nbSenders_ = elementsConnector[0]->getNbSenders() ;
@@ -48,5 +48,5 @@
       {
         int n = elementsConnector_.size()-1 ;
-        CScattererConnector** connector = elementsConnector_.data() + n ;
+        shared_ptr<CScattererConnector>* connector = elementsConnector_.data() + n ;
         for(int rank : ranks_) 
         {
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.cpp	(revision 2267)
@@ -16,8 +16,8 @@
     int nElements = srcViews_.size() ;
 
-    CGridRemoteConnector remoteConnector(srcViews_, remoteViews_, localComm_, commSize) ;  
-    remoteConnector.computeConnector() ;
+    auto remoteConnector = make_shared<CGridRemoteConnector>(srcViews_, remoteViews_, localComm_, commSize) ;  
+    remoteConnector->computeConnector() ;
     
-    vector<CDistributedElement*> sendElements(nElements) ;
+    vector<shared_ptr<CDistributedElement>> sendElements(nElements) ;
     scattererConnector_.resize(nElements) ;
     gathererConnector_.resize(nElements) ;
@@ -25,7 +25,7 @@
     for(int i=0;i<nElements;i++)
     {
-      sendElements[i] = new CDistributedElement(srcViews_[i]->getGlobalSize(), remoteConnector.getDistributedGlobalIndex(i)) ;
+      sendElements[i] = make_shared<CDistributedElement>(srcViews_[i]->getGlobalSize(), remoteConnector->getDistributedGlobalIndex(i)) ;
       sendElements[i]->addFullView() ;
-      scattererConnector_[i] = new CScattererConnector(srcViews_[i], sendElements[i]->getView(CElementView::FULL), localComm_, commSize) ;
+      scattererConnector_[i] = make_shared<CScattererConnector>(srcViews_[i], sendElements[i]->getView(CElementView::FULL), localComm_, commSize) ;
       scattererConnector_[i]->computeConnector() ;
       std::map<int, CArray<size_t,1>>& sendIndex = sendElements[i]->getGlobalIndex() ;
@@ -75,12 +75,12 @@
       // create gatherer connector
 
-      CDistributedElement recvElement(remoteViews_[i]->getGlobalSize(), recvIndex) ;
-      recvElement.addFullView() ;
-      gathererConnector_[i] = new CGathererConnector(recvElement.getView(CElementView::FULL), remoteViews_[i]) ;
+      auto recvElement = make_shared<CDistributedElement>(remoteViews_[i]->getGlobalSize(), recvIndex) ;
+      recvElement->addFullView() ;
+      gathererConnector_[i] = make_shared<CGathererConnector>(recvElement->getView(CElementView::FULL), remoteViews_[i]) ;
       gathererConnector_[i]->computeConnector() ;
     }
 
-    gridScattererConnector_ = new CGridScattererConnector(scattererConnector_) ;
-    gridGathererConnector_  = new CGridGathererConnector(gathererConnector_) ;
+    gridScattererConnector_ = make_shared<CGridScattererConnector>(scattererConnector_) ;
+    gridGathererConnector_  = make_shared<CGridGathererConnector>(gathererConnector_) ;
   }
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_transform_connector.hpp	(revision 2267)
@@ -18,5 +18,5 @@
      
     public:
-      CGridTransformConnector(vector<CLocalView*> srcViews, vector<CLocalView*> remoteViews, MPI_Comm localComm) 
+      CGridTransformConnector(vector<shared_ptr<CLocalView>> srcViews, vector<shared_ptr<CLocalView>> remoteViews, MPI_Comm localComm) 
                           : srcViews_(srcViews), remoteViews_(remoteViews), localComm_(localComm) 
                           { computeConnector();}
@@ -25,12 +25,12 @@
     protected:
      MPI_Comm localComm_ ;
-     vector<CLocalView*> srcViews_ ;
-     vector<CLocalView*> remoteViews_ ;
+     vector<shared_ptr<CLocalView>> srcViews_ ;
+     vector<shared_ptr<CLocalView>> remoteViews_ ;
      map<int,int> recvRankSize_ ;
 
-     vector<CScattererConnector*> scattererConnector_ ;
-     vector<CGathererConnector*>  gathererConnector_ ;
-     CGridScattererConnector* gridScattererConnector_ ;
-     CGridGathererConnector* gridGathererConnector_ ;
+     vector<shared_ptr<CScattererConnector>> scattererConnector_ ;
+     vector<shared_ptr<CGathererConnector>>  gathererConnector_ ;
+     shared_ptr<CGridScattererConnector> gridScattererConnector_ ;
+     shared_ptr<CGridGathererConnector> gridGathererConnector_ ;
   
     public:
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_connector.hpp	(revision 2267)
@@ -15,6 +15,6 @@
     
     private:
-      CLocalView* srcView_;
-      CLocalView* dstView_;
+      shared_ptr<CLocalView> srcView_;
+      shared_ptr<CLocalView> dstView_;
       int srcSize_ ;
       int dstSize_ ;
@@ -24,5 +24,5 @@
     public:
     
-      CLocalConnector(CLocalView* srcView, CLocalView* dstView) : srcView_(srcView), dstView_(dstView), 
+      CLocalConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) : srcView_(srcView), dstView_(dstView), 
                                                                   srcSize_(srcView->getSize()), dstSize_(dstView->getSize()) {}
       void computeConnector(void);
@@ -59,5 +59,5 @@
       }
 
-      template<typename T> void transfer(CLocalConnector** connectors, int nConnectors, const T* input, T* output)
+      template<typename T> void transfer(shared_ptr<CLocalConnector>* connectors, int nConnectors, const T* input, T* output)
       {
 
@@ -91,5 +91,5 @@
       }
 
-      template<typename T> void transfer(CLocalConnector** connectors, int nConnectors, const T* input, T* output, T missingValue)
+      template<typename T> void transfer(shared_ptr<CLocalConnector>* connectors, int nConnectors, const T* input, T* output, T missingValue)
       {
         int size=mask_.size() ;
@@ -123,8 +123,8 @@
       }
 
-      int getSrcSliceSize(CLocalConnector** connectors, int nConnectors) 
+      int getSrcSliceSize(shared_ptr<CLocalConnector>* connectors, int nConnectors) 
       { if (nConnectors==0) return srcSize_ ; else return srcSize_ * (*(connectors-1))->getSrcSliceSize(connectors-1,nConnectors-1) ; }
 
-      int getDstSliceSize(CLocalConnector** connectors, int nConnectors) 
+      int getDstSliceSize(shared_ptr<CLocalConnector>* connectors, int nConnectors) 
       { if (nConnectors==0) return dstSize_ ; else return dstSize_ * (*(connectors-1))->getDstSliceSize(connectors-1,nConnectors-1) ; }
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_view.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_view.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_view.cpp	(revision 2267)
@@ -6,5 +6,5 @@
 namespace xios
 {
-  CLocalView::CLocalView(CLocalElement* parent, CElementView::type type, const CArray<int,1>& indexView) 
+  CLocalView::CLocalView(shared_ptr<CLocalElement> parent, CElementView::type type, const CArray<int,1>& indexView) 
                         : CDistributedView( parent, type, {{  parent->localRank_,  indexView }} ),
                           localRank_(parent->localRank_),
@@ -15,5 +15,5 @@
   }
 
-  CLocalView::CLocalView(CLocalElement* parent, CElementView::type type, const CArray<bool,1>& maskView) 
+  CLocalView::CLocalView(shared_ptr<CLocalElement> parent, CElementView::type type, const CArray<bool,1>& maskView) 
                         : CDistributedView( parent, type, {{  parent->localRank_,  maskView }} ),
                           localRank_(parent->localRank_),
@@ -24,5 +24,5 @@
   }
 
-  void CLocalView::sendRemoteElement(CRemoteConnector& connector, CContextClient* client, CEventClient& event, const CMessage& messageHeader)
+  void CLocalView::sendRemoteElement(shared_ptr<CRemoteConnector> connector, CContextClient* client, CEventClient& event, const CMessage& messageHeader)
   {
     int n = index_.numElements() ;
@@ -36,5 +36,5 @@
     CMessage message(messageHeader) ;
     message<<globalSize_ ;
-    connector.transferToServer(ind, client, event, message) ;
+    connector->transferToServer(ind, client, event, message) ;
   }
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_view.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_view.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/local_view.hpp	(revision 2267)
@@ -16,6 +16,6 @@
   {
     public:
-    CLocalView(CLocalElement* parent, CElementView::type type, const CArray<int,1>& indexView) ;
-    CLocalView(CLocalElement* parent, CElementView::type type, const CArray<bool,1>& maskView) ;
+    CLocalView(shared_ptr<CLocalElement> parent, CElementView::type type, const CArray<int,1>& indexView) ;
+    CLocalView(shared_ptr<CLocalElement> parent, CElementView::type type, const CArray<bool,1>& maskView) ;
 
     const CArray<int,1>& getIndex(void) { return index_ ;}
@@ -38,5 +38,5 @@
     }    
 
-    void getGlobalIndex(vector<size_t>& globalIndex, size_t sliceIndex, size_t* sliceSize, CLocalView** localView, int pos)
+    void getGlobalIndex(vector<size_t>& globalIndex, size_t sliceIndex, size_t* sliceSize, shared_ptr<CLocalView>* localView, int pos)
     {
       if (pos==0)
@@ -56,5 +56,5 @@
     int getLocalSize(void) {return localSize_ ;}
     int getSize(void) {return size_;} 
-    void sendRemoteElement(CRemoteConnector& connector, CContextClient* client, CEventClient& event, const CMessage& messageHeader) ;
+    void sendRemoteElement(shared_ptr<CRemoteConnector> connector, CContextClient* client, CEventClient& event, const CMessage& messageHeader) ;
    
     CArray<size_t,1>& globalIndex_ ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.cpp	(revision 2267)
@@ -5,5 +5,5 @@
 {
 
-  CReduceTransformConnector::CReduceTransformConnector(CLocalView* srcView, CLocalView* dstView, EReduction op, 
+  CReduceTransformConnector::CReduceTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, EReduction op, 
                                                        unordered_map<int, std::vector<int>>& indexMap, bool detectMissingValue)
    : srcView_(srcView), dstView_(dstView), detectMissingValue_(detectMissingValue)
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.hpp	(revision 2267)
@@ -17,6 +17,6 @@
     
     private:
-      CLocalView* srcView_;
-      CLocalView* dstView_;
+      shared_ptr<CLocalView> srcView_;
+      shared_ptr<CLocalView> dstView_;
 
       vector<int> connector_;  //  sizeof sum(nWeights_)  
@@ -34,5 +34,5 @@
     public:
 
-    CReduceTransformConnector(CLocalView* srcView, CLocalView* dstView, EReduction op, unordered_map<int, std::vector<int>>& indexMap, 
+    CReduceTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, EReduction op, unordered_map<int, std::vector<int>>& indexMap, 
                               bool detectMissingValue=true) ;
  
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/remote_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/remote_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/remote_connector.hpp	(revision 2267)
@@ -17,6 +17,6 @@
   {
     private:
-      CLocalView* srcView_;
-      CDistributedView* dstView_;
+      shared_ptr<CLocalView> srcView_;
+      shared_ptr<CDistributedView> dstView_;
       map<int, vector<int>> connector_ ; // connector[rank][srcIndex]
 
@@ -26,5 +26,5 @@
     
     public:
-      CRemoteConnector(CLocalView* srcView, CDistributedView* dstView, MPI_Comm localComm) : srcView_(srcView), dstView_(dstView), localComm_(localComm){} ;
+      CRemoteConnector(shared_ptr<CLocalView> srcView, shared_ptr<CDistributedView> dstView, MPI_Comm localComm) : srcView_(srcView), dstView_(dstView), localComm_(localComm){} ;
       void computeConnector(void) ;
       map<int, CArray<size_t,1>>& getDistributedGlobalIndex() { return element_ ;} 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/scatterer_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/scatterer_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/scatterer_connector.hpp	(revision 2267)
@@ -23,6 +23,6 @@
       int remoteCommSize_ ;
 
-      CLocalView* srcView_ ;
-      CDistributedView* dstView_ ;
+      shared_ptr<CLocalView> srcView_ ;
+      shared_ptr<CDistributedView> dstView_ ;
       map<int,int> nbSenders_ ; // number of participant when sending remote buffer
       int srcSize_ ;
@@ -31,5 +31,5 @@
     public:
 
-    CScattererConnector(CLocalView* srcView, CDistributedView* dstView, MPI_Comm localComm, int remoteCommSize) 
+    CScattererConnector(shared_ptr<CLocalView> srcView, shared_ptr<CDistributedView> dstView, MPI_Comm localComm, int remoteCommSize) 
                        : srcView_(srcView), dstView_(dstView), localComm_(localComm), remoteCommSize_(remoteCommSize) {}
     void computeConnector(void) ;
@@ -147,5 +147,5 @@
 
     template<typename T> 
-    void transfer(int rank, CScattererConnector** connectors, int nConnectors, const T* input, T* output)
+    void transfer(int rank, shared_ptr<CScattererConnector>* connectors, int nConnectors, const T* input, T* output)
     {
       auto& connector = connector_[rank] ; // probably costly, find a better way to avoid the map
@@ -197,8 +197,8 @@
     }
 
-    int getSrcSliceSize(CScattererConnector** connectors, int nConnectors) 
+    int getSrcSliceSize(shared_ptr<CScattererConnector>* connectors, int nConnectors) 
     { if (nConnectors==0) return srcSize_ ; else return srcSize_ * (*(connectors-1))->getSrcSliceSize(connectors-1,nConnectors-1) ; }
 
-    int getDstSliceSize(int rank, CScattererConnector** connectors, int nConnectors) 
+    int getDstSliceSize(int rank, shared_ptr<CScattererConnector>* connectors, int nConnectors) 
     { if (nConnectors==0) return dstSize_[rank] ; else return dstSize_[rank] * (*(connectors-1))->getDstSliceSize(rank, connectors-1,nConnectors-1) ; }
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transfer_transform_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transfer_transform_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transfer_transform_connector.cpp	(revision 2267)
@@ -4,5 +4,5 @@
 {
 
-  CTransferTransformConnector::CTransferTransformConnector(CLocalView* srcView, CLocalView* dstView, unordered_map<int, int>& indexMap) 
+  CTransferTransformConnector::CTransferTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, unordered_map<int, int>& indexMap) 
     : srcView_(srcView), dstView_(dstView)
   {
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transfer_transform_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transfer_transform_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transfer_transform_connector.hpp	(revision 2267)
@@ -15,6 +15,6 @@
     
     private:
-      CLocalView* srcView_;
-      CLocalView* dstView_;
+      shared_ptr<CLocalView> srcView_;
+      shared_ptr<CLocalView> dstView_;
 
       vector<int> connector_;    
@@ -27,5 +27,5 @@
     public:
 
-    CTransferTransformConnector(CLocalView* srcView, CLocalView* dstView, unordered_map<int, int>& indexMap) ;
+    CTransferTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, unordered_map<int, int>& indexMap) ;
  
     void transfer(int repeat, int sizeT, const CArray<double,1>& dataIn, CArray<double,1>& dataOut)
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transform_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transform_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transform_connector.cpp	(revision 2267)
@@ -56,11 +56,11 @@
 
     // distributed element : where to send data
-    CDistributedElement dstElement(srcView_->getGlobalSize(), dstArrayIndex) ;
-    dstElement.addFullView() ;
+    auto dstElement = make_shared<CDistributedElement>(srcView_->getGlobalSize(), dstArrayIndex) ;
+    dstElement->addFullView() ;
     
     // create scatterer connector
     int commSize ;
     MPI_Comm_size(localComm_, &commSize) ;
-    scattererConnector_ = new CScattererConnector(srcView_, dstElement.getView(CElementView::FULL), localComm_, commSize ) ;
+    scattererConnector_ = make_shared<CScattererConnector>(srcView_, dstElement->getView(CElementView::FULL), localComm_, commSize ) ;
     scattererConnector_->computeConnector() ;
 
@@ -98,7 +98,7 @@
     MPI_Waitall(sendReq.size(),sendReq.data(),sendStatus.data()) ;
 
-    CDistributedElement remoteElement(dstView_->getGlobalSize(), remoteArrayIndex) ;
-    remoteElement.addFullView() ;
-    gathererConnector_=new CGathererConnector(remoteElement.getView(CElementView::FULL),dstView_) ;
+    auto remoteElement = make_shared<CDistributedElement>(dstView_->getGlobalSize(), remoteArrayIndex) ;
+    remoteElement->addFullView() ;
+    gathererConnector_= make_shared<CGathererConnector>(remoteElement->getView(CElementView::FULL),dstView_) ;
     gathererConnector_->computeConnector() ;
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transform_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transform_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/transform_connector.hpp	(revision 2267)
@@ -18,5 +18,5 @@
      
     public:
-      CTransformConnector(CLocalView* srcView, CLocalView* dstView, MPI_Comm localComm) 
+      CTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, MPI_Comm localComm) 
                           : srcView_(srcView), dstView_(dstView), localComm_(localComm) {}
     
@@ -25,9 +25,9 @@
 
       MPI_Comm localComm_ ;
-      CLocalView* srcView_ ;
-      CLocalView* dstView_ ;
+      shared_ptr<CLocalView> srcView_ ;
+      shared_ptr<CLocalView> dstView_ ;
       map<int,int> recvRankSize_ ;
-      CScattererConnector* scattererConnector_=nullptr ;
-      CGathererConnector*  gathererConnector_=nullptr ;
+      shared_ptr<CScattererConnector> scattererConnector_ ;
+      shared_ptr<CGathererConnector>  gathererConnector_ ;
    
     public:
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/weight_transform_connector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/weight_transform_connector.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/weight_transform_connector.cpp	(revision 2267)
@@ -4,5 +4,5 @@
 {
 
-  CWeightTransformConnector::CWeightTransformConnector(CLocalView* srcView, CLocalView* dstView, unordered_map<int, std::vector<int>>& indexMap, 
+  CWeightTransformConnector::CWeightTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, unordered_map<int, std::vector<int>>& indexMap, 
                                                    unordered_map<int, std::vector<double>>& weightMap) : srcView_(srcView), dstView_(dstView)
   {
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/weight_transform_connector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/weight_transform_connector.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/weight_transform_connector.hpp	(revision 2267)
@@ -15,6 +15,6 @@
     
     private:
-      CLocalView* srcView_;
-      CLocalView* dstView_;
+      shared_ptr<CLocalView> srcView_;
+      shared_ptr<CLocalView> dstView_;
 
       vector<double> weights_; //  sizeof sum(nWeights_)  
@@ -28,5 +28,5 @@
     public:
 
-    CWeightTransformConnector(CLocalView* srcView, CLocalView* dstView, unordered_map<int, std::vector<int>>& indexMap, 
+    CWeightTransformConnector(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView, unordered_map<int, std::vector<int>>& indexMap, 
                               unordered_map<int, std::vector<double>>& weightMap) ;
  
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_reader_source_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_reader_source_filter.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_reader_source_filter.cpp	(revision 2267)
@@ -71,5 +71,5 @@
   void CFileReaderSourceFilter::readData(CArray<double,1>& data)
   {
-    CGridLocalConnector*  connector = grid_->getFullToWorkflowConnector() ;
+    shared_ptr<CGridLocalConnector> connector = grid_->getFullToWorkflowConnector() ;
     CArray<double,1> dataIn(connector->getSrcSize()) ;
     file_->getDataInput()->readFieldData(field_, nStep_%nStepMax_, dataIn);
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp	(revision 2267)
@@ -1400,5 +1400,5 @@
               compress = latName + appendDomId + " " + lonName + appendDomId;
      
-              CLocalView* workflowView = domain->getLocalView(CElementView::WORKFLOW) ;
+              shared_ptr<CLocalView> workflowView = domain->getLocalView(CElementView::WORKFLOW) ;
               workflowView->getGlobalIndexView(indexes) ;
               nbIndexes = workflowView->getSize() ;
@@ -1435,5 +1435,5 @@
               compress = axisId;
 
-              CLocalView* workflowView = axis->getLocalView(CElementView::WORKFLOW) ;
+              shared_ptr<CLocalView> workflowView = axis->getLocalView(CElementView::WORKFLOW) ;
               workflowView->getGlobalIndexView(indexes) ;
               nbIndexes = workflowView->getSize() ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/memtrack.cpp	(revision 2267)
@@ -494,5 +494,5 @@
         }
         
-        xios::CAddr2line myaddr2line ;
+        //xios::CAddr2line myaddr2line ;
         size_t i = 0 ;
         for(auto& it : orderedBlocks)
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp	(revision 2267)
@@ -747,5 +747,5 @@
       for (int i=0;i<n;i++) ind(i)=index(i) ;
 
-      localElement_ = new CLocalElement(rank, n_glo, ind) ;
+      localElement_ = make_shared<CLocalElement>(rank, n_glo, ind) ;
    }
 
@@ -783,7 +783,7 @@
    void CAxis::computeModelToWorkflowConnector(void)
    { 
-     CLocalView* srcView=getLocalView(CElementView::MODEL) ;
-     CLocalView* dstView=getLocalView(CElementView::WORKFLOW) ;
-     modelToWorkflowConnector_ = new CLocalConnector(srcView, dstView); 
+     shared_ptr<CLocalView> srcView=getLocalView(CElementView::MODEL) ;
+     shared_ptr<CLocalView> dstView=getLocalView(CElementView::WORKFLOW) ;
+     modelToWorkflowConnector_ = make_shared<CLocalConnector>(srcView, dstView); 
      modelToWorkflowConnector_->computeConnector() ;
    }
@@ -834,10 +834,10 @@
       for (auto& rankServer : client->getRanksServerLeader()) globalIndex[rankServer].reference(indGlo.copy()); 
     }
-    remoteElement_[client] = new CDistributedElement(n_glo, globalIndex) ;
+    remoteElement_[client] = make_shared<CDistributedElement>(n_glo, globalIndex) ;
     remoteElement_[client]->addFullView() ;
   }
  
   void CAxis::distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, 
-                                 CScattererConnector* &scattererConnector, const string& axisId)
+                                 shared_ptr<CScattererConnector> &scattererConnector, const string& axisId)
   {
     string serverAxisId = axisId.empty() ? this->getId() : axisId ;
@@ -846,8 +846,8 @@
     this->sendAllAttributesToServer(client, serverAxisId)  ;
 
-    CDistributedElement scatteredElement(n_glo,globalIndex) ;
-    scatteredElement.addFullView() ;
-    scattererConnector = new CScattererConnector(localElement_->getView(CElementView::FULL), scatteredElement.getView(CElementView::FULL), 
-                                                 context->getIntraComm(), client->getRemoteSize()) ;
+    auto scatteredElement = make_shared<CDistributedElement>(n_glo,globalIndex) ;
+    scatteredElement->addFullView() ;
+    scattererConnector = make_shared<CScattererConnector>(localElement_->getView(CElementView::FULL), scatteredElement->getView(CElementView::FULL), 
+                                                          context->getIntraComm(), client->getRemoteSize()) ;
     scattererConnector->computeConnector() ;
     
@@ -866,13 +866,13 @@
     scattererConnector->transfer(localElement_->getView(CElementView::FULL)->getGlobalIndex(),client,event1,message1) ;
 
-    sendDistributedAttributes(client, *scattererConnector, axisId) ;
+    sendDistributedAttributes(client, scattererConnector, axisId) ;
   
     // phase 2 send the mask : data index + mask2D
     CArray<bool,1> maskIn(localElement_->getView(CElementView::WORKFLOW)->getSize());
     CArray<bool,1> maskOut ;
-    CLocalConnector workflowToFull(localElement_->getView(CElementView::WORKFLOW), localElement_->getView(CElementView::FULL)) ;
-    workflowToFull.computeConnector() ;
+    auto workflowToFull = make_shared<CLocalConnector>(localElement_->getView(CElementView::WORKFLOW), localElement_->getView(CElementView::FULL)) ;
+    workflowToFull->computeConnector() ;
     maskIn=true ;
-    workflowToFull.transfer(maskIn,maskOut,false) ;
+    workflowToFull->transfer(maskIn,maskOut,false) ;
 
     // phase 3 : prepare grid scatterer connector to send data from client to server
@@ -880,18 +880,18 @@
     map<int,CArray<bool,1>> maskOut2 ; 
     scattererConnector->transfer(maskOut, maskOut2) ;
-    scatteredElement.addView(CElementView::WORKFLOW, maskOut2) ;
-    scatteredElement.getView(CElementView::WORKFLOW)->getGlobalIndexView(workflowGlobalIndex) ;
+    scatteredElement->addView(CElementView::WORKFLOW, maskOut2) ;
+    scatteredElement->getView(CElementView::WORKFLOW)->getGlobalIndexView(workflowGlobalIndex) ;
     // create new workflow view for scattered element
-    CDistributedElement clientToServerElement(scatteredElement.getGlobalSize(), workflowGlobalIndex) ;
-    clientToServerElement.addFullView() ;
+    auto clientToServerElement = make_shared<CDistributedElement>(scatteredElement->getGlobalSize(), workflowGlobalIndex) ;
+    clientToServerElement->addFullView() ;
     CEventClient event2(getType(), EVENT_ID_AXIS_DISTRIBUTION);
     CMessage message2 ;
     message2<<serverAxisId<<2 ; 
-    clientToServerElement.sendToServer(client, event2, message2) ; 
-    clientToServerConnector_[client] = new CScattererConnector(localElement_->getView(CElementView::WORKFLOW), clientToServerElement.getView(CElementView::FULL), 
-                                                              context->getIntraComm(), client->getRemoteSize()) ;
+    clientToServerElement->sendToServer(client, event2, message2) ; 
+    clientToServerConnector_[client] = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), clientToServerElement->getView(CElementView::FULL), 
+                                                                        context->getIntraComm(), client->getRemoteSize()) ;
     clientToServerConnector_[client]->computeConnector() ;
 
-    clientFromServerConnector_[client] = new CGathererConnector(clientToServerElement.getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW));
+    clientFromServerConnector_[client] = make_shared<CGathererConnector>(clientToServerElement->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW));
     clientFromServerConnector_[client]->computeConnector() ;
 
@@ -916,5 +916,5 @@
     if (phasis==0) // receive the remote element to construct the full view
     {
-      localElement_ = new  CLocalElement(context->getIntraCommRank(),event) ;
+      localElement_ = make_shared<CLocalElement>(context->getIntraCommRank(),event) ;
       localElement_->addFullView() ;
       // construct the local dimension and indexes
@@ -937,7 +937,7 @@
     {
       CContext* context = CContext::getCurrent();
-      CDistributedElement* elementFrom = new  CDistributedElement(event) ;
+      shared_ptr<CDistributedElement> elementFrom = make_shared<CDistributedElement>(event) ;
       elementFrom->addFullView() ;
-      gathererConnector_ = new CGathererConnector(elementFrom->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
+      gathererConnector_ = make_shared<CGathererConnector>(elementFrom->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
       gathererConnector_->computeConnector() ; 
     }
@@ -945,7 +945,7 @@
     {
 //      delete gathererConnector_ ;
-      elementFrom_ = new  CDistributedElement(event) ;
+      elementFrom_ = make_shared<CDistributedElement>(event) ;
       elementFrom_->addFullView() ;
-//      gathererConnector_ =  new CGathererConnector(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
+//      gathererConnector_ =  make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
 //      gathererConnector_ -> computeConnector() ;
     }
@@ -961,14 +961,14 @@
     mask.reference(serverMask.copy()) ;
  
-    serverFromClientConnector_ = new CGathererConnector(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ;
+    serverFromClientConnector_ = make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ;
     serverFromClientConnector_->computeConnector() ;
       
-    serverToClientConnector_ = new CScattererConnector(localElement_->getView(CElementView::WORKFLOW), elementFrom_->getView(CElementView::FULL),
-                                                         context->getIntraComm(), client->getRemoteSize()) ;
+    serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementFrom_->getView(CElementView::FULL),
+                                                                context->getIntraComm(), client->getRemoteSize()) ;
     serverToClientConnector_->computeConnector() ;
   }
   CATCH_DUMP_ATTR
 
-  void CAxis::sendDistributedAttributes(CContextClient* client, CScattererConnector& scattererConnector, const string& axisId)
+  void CAxis::sendDistributedAttributes(CContextClient* client, shared_ptr<CScattererConnector> scattererConnector, const string& axisId)
   {
     string serverAxisId = axisId.empty() ? this->getId() : axisId ;
@@ -981,5 +981,5 @@
         CMessage message ;
         message<<serverAxisId<<string("value") ; 
-        scattererConnector.transfer(value, client, event,message) ;
+        scattererConnector->transfer(value, client, event,message) ;
       }
     }
@@ -991,5 +991,5 @@
         CMessage message ;
         message<<serverAxisId<<string("bounds") ; 
-        scattererConnector.transfer(2, bounds, client, event,message) ;
+        scattererConnector->transfer(2, bounds, client, event,message) ;
       }
     }
@@ -1016,5 +1016,5 @@
         CMessage message ;
         message<<serverAxisId<<string("label")<<maxSize ;
-        scattererConnector.transfer(maxSize, charArray, client, event,message) ;
+        scattererConnector->transfer(maxSize, charArray, client, event,message) ;
       }
     }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp	(revision 2267)
@@ -222,9 +222,9 @@
          
         private:
-         CLocalElement* localElement_ = nullptr ;
+         shared_ptr<CLocalElement> localElement_ ;
          void initializeLocalElement(void) ;
         public: 
-         CLocalElement* getLocalElement(void) { if (localElement_==nullptr) initializeLocalElement() ; return localElement_ ; }
-         CLocalView* getLocalView(CElementView::type type) { return getLocalElement()->getView(type) ;}
+         shared_ptr<CLocalElement> getLocalElement(void) { if (localElement_==nullptr) initializeLocalElement() ; return localElement_ ; }
+         shared_ptr<CLocalView> getLocalView(CElementView::type type) { return getLocalElement()->getView(type) ;}
         private:
          void addFullView(void) ;
@@ -233,12 +233,12 @@
 
         private:
-         CLocalConnector* modelToWorkflowConnector_ ;
+         shared_ptr<CLocalConnector> modelToWorkflowConnector_ ;
          void computeModelToWorkflowConnector(void)  ;
         public:
-         CLocalConnector* getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_ ;}
+         shared_ptr<CLocalConnector> getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_ ;}
        
        public:
          void computeRemoteElement(CContextClient* client, EDistributionType) ;
-         void distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, CScattererConnector* &scattererConnector,
+         void distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, shared_ptr<CScattererConnector>& scattererConnector,
                                  const string& axisId="") ;
 
@@ -246,34 +246,34 @@
          void receivedAxisDistribution(CEventServer& event, int phasis) ;
          void setServerMask(CArray<bool,1>& serverMask, CContextClient* client ) ;
-         void sendDistributedAttributes(CContextClient* client, CScattererConnector& scattererConnector, const string& axisId) ;
+         void sendDistributedAttributes(CContextClient* client, shared_ptr<CScattererConnector> scattererConnector, const string& axisId) ;
          static void recvDistributedAttributes(CEventServer& event) ;
          void recvDistributedAttributes(CEventServer& event, const string& type) ;
        private:
-         map<CContextClient*, CDistributedElement*> remoteElement_ ;
-       public: 
-         CDistributedElement* getRemoteElement(CContextClient* client) {return remoteElement_[client] ;}
-       private:
-         map<CContextClient*, CScattererConnector*> clientToServerConnector_ ;
-       public: 
-         CScattererConnector* getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;}
-       private:
-         CGathererConnector*  gathererConnector_ ;
+         map<CContextClient*, shared_ptr<CDistributedElement>> remoteElement_ ;
+       public: 
+         shared_ptr<CDistributedElement> getRemoteElement(CContextClient* client) {return remoteElement_[client] ;}
+       private:
+         map<CContextClient*, shared_ptr<CScattererConnector>> clientToServerConnector_ ;
+       public: 
+         shared_ptr<CScattererConnector> getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;}
+       private:
+         shared_ptr<CGathererConnector>  gathererConnector_ ;
        public:
-         CGathererConnector* getGathererConnector(void) { return gathererConnector_ ;}
-       private:
-         CGathererConnector* serverFromClientConnector_ ;
-         CDistributedElement* elementFrom_ ;
+         shared_ptr<CGathererConnector> getGathererConnector(void) { return gathererConnector_ ;}
+       private:
+         shared_ptr<CGathererConnector> serverFromClientConnector_ ;
+         shared_ptr<CDistributedElement> elementFrom_ ;
        public:
-        CGathererConnector* getServerFromClientConnector(void) { return serverFromClientConnector_ ;}
-
-       private:
-         CScattererConnector*  serverToClientConnector_ = nullptr ;
-       public: 
-         CScattererConnector* getServerToClientConnector(void) { return serverToClientConnector_ ;} 
-
-       private:
-          map<CContextClient*,CGathererConnector*>  clientFromServerConnector_  ;
-       public: 
-         CGathererConnector* getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client] ;} 
+        shared_ptr<CGathererConnector> getServerFromClientConnector(void) { return serverFromClientConnector_ ;}
+
+       private:
+         shared_ptr<CScattererConnector> serverToClientConnector_ = nullptr ;
+       public: 
+         shared_ptr<CScattererConnector> getServerToClientConnector(void) { return serverToClientConnector_ ;} 
+
+       private:
+          map<CContextClient*,shared_ptr<CGathererConnector>>  clientFromServerConnector_  ;
+       public: 
+        shared_ptr<CGathererConnector> getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client] ;} 
 
          DECLARE_REF_FUNC(Axis,axis)
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp	(revision 2267)
@@ -1740,6 +1740,6 @@
       // testing ?
      /*
-      CLocalView* local = localElement_->getView(CElementView::WORKFLOW) ;
-      CLocalView* model = localElement_->getView(CElementView::MODEL) ;
+      shared_ptr<CLocalView> local = localElement_->getView(CElementView::WORKFLOW) ;
+      shared_ptr<CLocalView> model = localElement_->getView(CElementView::MODEL) ;
 
       CLocalConnector test1(model, local) ;
@@ -1773,5 +1773,5 @@
       for(int ij=0; ij<nij ; ij++) ij_index(ij) = i_index(ij)+j_index(ij)*ni_glo ;
       int rank = CContext::getCurrent()->getIntraCommRank() ;
-      localElement_ = new CLocalElement(rank, ni_glo*nj_glo, ij_index) ;
+      localElement_ = make_shared<CLocalElement>(rank, ni_glo*nj_glo, ij_index) ;
    }
 
@@ -1830,7 +1830,7 @@
    void CDomain::computeModelToWorkflowConnector(void)
    { 
-     CLocalView* srcView=getLocalView(CElementView::MODEL) ;
-     CLocalView* dstView=getLocalView(CElementView::WORKFLOW) ;
-     modelToWorkflowConnector_ = new CLocalConnector(srcView, dstView); 
+     shared_ptr<CLocalView> srcView=getLocalView(CElementView::MODEL) ;
+     shared_ptr<CLocalView> dstView=getLocalView(CElementView::WORKFLOW) ;
+     modelToWorkflowConnector_ = make_shared<CLocalConnector>(srcView, dstView); 
      modelToWorkflowConnector_->computeConnector() ;
    }
@@ -1989,5 +1989,5 @@
       for (auto& rankServer : client->getRanksServerLeader()) globalIndex[rankServer] = indGlo ; 
     }
-    remoteElement_[client] = new CDistributedElement(ni_glo*nj_glo, globalIndex) ;
+    remoteElement_[client] = make_shared<CDistributedElement>(ni_glo*nj_glo, globalIndex) ;
     remoteElement_[client]->addFullView() ;
   }
@@ -1997,5 +1997,5 @@
 
   void CDomain::distributeToServer(CContextClient* client, map<int, CArray<size_t,1>>& globalIndex,
-                                   CScattererConnector* &scattererConnector, const string& domainId)
+                                   shared_ptr<CScattererConnector> &scattererConnector, const string& domainId)
   TRY
   {
@@ -2005,8 +2005,8 @@
     this->sendAllAttributesToServer(client, serverDomainId)  ;
 
-    CDistributedElement scatteredElement(ni_glo*nj_glo, globalIndex) ;
-    scatteredElement.addFullView() ;
-    scattererConnector = new CScattererConnector(localElement_->getView(CElementView::FULL), scatteredElement.getView(CElementView::FULL), 
-                                           context->getIntraComm(), client->getRemoteSize()) ;
+    auto scatteredElement = make_shared<CDistributedElement>(ni_glo*nj_glo, globalIndex) ;
+    scatteredElement->addFullView() ;
+    scattererConnector = make_shared<CScattererConnector>(localElement_->getView(CElementView::FULL), scatteredElement->getView(CElementView::FULL), 
+                                                          context->getIntraComm(), client->getRemoteSize()) ;
     scattererConnector->computeConnector() ;
 
@@ -2025,5 +2025,5 @@
     scattererConnector->transfer(localElement_->getView(CElementView::FULL)->getGlobalIndex(),client,event1,message1) ;
     
-    sendDistributedAttributes(client, *scattererConnector, domainId) ;
+    sendDistributedAttributes(client, scattererConnector, domainId) ;
 
   
@@ -2031,8 +2031,8 @@
     CArray<bool,1> maskIn(localElement_->getView(CElementView::WORKFLOW)->getSize());
     CArray<bool,1> maskOut ;
-    CLocalConnector workflowToFull(localElement_->getView(CElementView::WORKFLOW), localElement_->getView(CElementView::FULL)) ;
-    workflowToFull.computeConnector() ;
+    auto workflowToFull = make_shared<CLocalConnector>(localElement_->getView(CElementView::WORKFLOW), localElement_->getView(CElementView::FULL)) ;
+    workflowToFull->computeConnector() ;
     maskIn=true ;
-    workflowToFull.transfer(maskIn,maskOut,false) ;
+    workflowToFull->transfer(maskIn,maskOut,false) ;
 
 
@@ -2041,18 +2041,18 @@
     map<int,CArray<bool,1>> maskOut2 ; 
     scattererConnector->transfer(maskOut, maskOut2, false) ;
-    scatteredElement.addView(CElementView::WORKFLOW, maskOut2) ;
-    scatteredElement.getView(CElementView::WORKFLOW)->getGlobalIndexView(workflowGlobalIndex) ;
+    scatteredElement->addView(CElementView::WORKFLOW, maskOut2) ;
+    scatteredElement->getView(CElementView::WORKFLOW)->getGlobalIndexView(workflowGlobalIndex) ;
     // create new workflow view for scattered element
-    CDistributedElement clientToServerElement(scatteredElement.getGlobalSize(), workflowGlobalIndex) ;
-    clientToServerElement.addFullView() ;
+    auto clientToServerElement = make_shared<CDistributedElement>(scatteredElement->getGlobalSize(), workflowGlobalIndex) ;
+    clientToServerElement->addFullView() ;
     CEventClient event2(getType(), EVENT_ID_DOMAIN_DISTRIBUTION);
     CMessage message2 ;
     message2<<serverDomainId<<2 ; 
-    clientToServerElement.sendToServer(client, event2, message2) ; 
-    clientToServerConnector_[client] = new CScattererConnector(localElement_->getView(CElementView::WORKFLOW), clientToServerElement.getView(CElementView::FULL),
-                                                               context->getIntraComm(), client->getRemoteSize()) ;
+    clientToServerElement->sendToServer(client, event2, message2) ; 
+    clientToServerConnector_[client] = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), clientToServerElement->getView(CElementView::FULL),
+                                                                        context->getIntraComm(), client->getRemoteSize()) ;
     clientToServerConnector_[client]->computeConnector() ;
 
-    clientFromServerConnector_[client] = new CGathererConnector(clientToServerElement.getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW));
+    clientFromServerConnector_[client] = make_shared<CGathererConnector>(clientToServerElement->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW));
     clientFromServerConnector_[client]->computeConnector() ;
 
@@ -2076,5 +2076,5 @@
     if (phasis==0) // receive the remote element to construct the full view
     {
-      localElement_ = new  CLocalElement(context->getIntraCommRank(),event) ;
+      localElement_ = make_shared<CLocalElement>(context->getIntraCommRank(),event) ;
       localElement_->addFullView() ;
       // construct the local dimension and indexes
@@ -2102,7 +2102,7 @@
     {
       CContext* context = CContext::getCurrent();
-      CDistributedElement* elementFrom = new  CDistributedElement(event) ;
+      shared_ptr<CDistributedElement> elementFrom = make_shared<CDistributedElement>(event) ;
       elementFrom->addFullView() ;
-      gathererConnector_ = new CGathererConnector(elementFrom->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
+      gathererConnector_ = make_shared<CGathererConnector>(elementFrom->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
       gathererConnector_->computeConnector() ; 
     }
@@ -2110,7 +2110,7 @@
     {
 //      delete gathererConnector_ ;
-      elementFrom_ = new  CDistributedElement(event) ;
+      elementFrom_ = make_shared<CDistributedElement>(event) ;
       elementFrom_->addFullView() ;
-//      gathererConnector_ =  new CGathererConnector(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
+//      gathererConnector_ =  make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
 //      gathererConnector_ -> computeConnector() ;
     }
@@ -2127,9 +2127,9 @@
     mask_1d.reference(serverMask.copy()) ;
  
-    serverFromClientConnector_ = new CGathererConnector(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ;
+    serverFromClientConnector_ = make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ;
     serverFromClientConnector_->computeConnector() ;
       
-    serverToClientConnector_ = new CScattererConnector(localElement_->getView(CElementView::WORKFLOW), elementFrom_->getView(CElementView::FULL),
-                                                       context->getIntraComm(), client->getRemoteSize()) ;
+    serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementFrom_->getView(CElementView::FULL),
+                                                                context->getIntraComm(), client->getRemoteSize()) ;
     serverToClientConnector_->computeConnector() ;
   }
@@ -2137,5 +2137,5 @@
 
 
-  void CDomain::sendDistributedAttributes(CContextClient* client, CScattererConnector& scattererConnector,  const string& domainId)
+  void CDomain::sendDistributedAttributes(CContextClient* client, shared_ptr<CScattererConnector> scattererConnector,  const string& domainId)
   {
     string serverDomainId = domainId.empty() ? this->getId() : domainId ;
@@ -2148,5 +2148,5 @@
         CMessage message ;
         message<<serverDomainId<<string("lon") ; 
-        scattererConnector.transfer(lonvalue, client, event,message) ;
+        scattererConnector->transfer(lonvalue, client, event,message) ;
       }
       
@@ -2155,5 +2155,5 @@
         CMessage message ;
         message<<serverDomainId<<string("lat") ; 
-        scattererConnector.transfer(latvalue, client, event, message) ;
+        scattererConnector->transfer(latvalue, client, event, message) ;
       }
     }
@@ -2165,5 +2165,5 @@
         CMessage message ;
         message<<serverDomainId<<string("boundslon") ; 
-        scattererConnector.transfer(nvertex, bounds_lonvalue, client, event, message ) ;
+        scattererConnector->transfer(nvertex, bounds_lonvalue, client, event, message ) ;
       }
 
@@ -2172,5 +2172,5 @@
         CMessage message ;
         message<<serverDomainId<<string("boundslat") ; 
-        scattererConnector.transfer(nvertex, bounds_latvalue, client, event, message ) ;
+        scattererConnector->transfer(nvertex, bounds_latvalue, client, event, message ) ;
       }
     }
@@ -2181,5 +2181,5 @@
       CMessage message ;
       message<<serverDomainId<<string("area") ; 
-      scattererConnector.transfer(areavalue, client, event,message) ;
+      scattererConnector->transfer(areavalue, client, event,message) ;
     }
   }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp	(revision 2267)
@@ -285,10 +285,10 @@
        //////////////////////////////////////////////////////////////////////////////////////
        private:
-         CLocalElement* localElement_ = nullptr ;
+         shared_ptr<CLocalElement> localElement_ = nullptr ;
          void initializeLocalElement(void) ;
        
        public:  
-         CLocalElement* getLocalElement(void) { if (localElement_==nullptr) initializeLocalElement() ; return localElement_ ; }
-         CLocalView* getLocalView(CElementView::type type) { return getLocalElement()->getView(type) ;}
+         shared_ptr<CLocalElement> getLocalElement(void) { if (localElement_==nullptr) initializeLocalElement() ; return localElement_ ; }
+         shared_ptr<CLocalView> getLocalView(CElementView::type type) { return getLocalElement()->getView(type) ;}
        
        private:  
@@ -298,12 +298,12 @@
         
        private:
-         CLocalConnector* modelToWorkflowConnector_ ;
+         shared_ptr<CLocalConnector> modelToWorkflowConnector_ ;
          void computeModelToWorkflowConnector(void)  ;
        public:
-         CLocalConnector* getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_ ;}
+         shared_ptr<CLocalConnector> getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_ ;}
 
        public:
          void computeRemoteElement(CContextClient* client, EDistributionType) ;
-         void distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, CScattererConnector* &scattererConnector,
+         void distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, shared_ptr<CScattererConnector> &scattererConnector,
                                  const string& domainId="") ;
 
@@ -311,5 +311,5 @@
          void receivedDomainDistribution(CEventServer& event, int phasis) ;
 
-         void sendDistributedAttributes(CContextClient* client, CScattererConnector& scaterrerConnector, const string& domainId) ;
+         void sendDistributedAttributes(CContextClient* client, shared_ptr<CScattererConnector> scaterrerConnector, const string& domainId) ;
          static void recvDistributedAttributes(CEventServer& event) ;
          void recvDistributedAttributes(CEventServer& event, const string& type) ;
@@ -317,31 +317,31 @@
 
        private:
-         map<CContextClient*, CDistributedElement*> remoteElement_ ;
+         map<CContextClient*, shared_ptr<CDistributedElement>> remoteElement_ ;
        public: 
-         CDistributedElement* getRemoteElement(CContextClient* client) {return remoteElement_[client] ;}
-       private:
-         map<CContextClient*, CScattererConnector*> clientToServerConnector_ ;
+         shared_ptr<CDistributedElement> getRemoteElement(CContextClient* client) {return remoteElement_[client] ;}
+       private:
+         map<CContextClient*, shared_ptr<CScattererConnector>> clientToServerConnector_ ;
        public: 
-         CScattererConnector* getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;}
-       
-       private:
-         CGathererConnector*  gathererConnector_ ;
-       public:
-         CGathererConnector* getGathererConnector(void) { return gathererConnector_ ;}
+         shared_ptr<CScattererConnector> getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;}
+       
+       private:
+         shared_ptr<CGathererConnector>  gathererConnector_ ;
+       public:
+         shared_ptr<CGathererConnector> getGathererConnector(void) { return gathererConnector_ ;}
         private:
-         CGathererConnector* serverFromClientConnector_ ;
-         CDistributedElement* elementFrom_ ;
-       public:
-         CGathererConnector* getServerFromClientConnector(void) { return serverFromClientConnector_ ;}
-
-       private:
-         CScattererConnector*  serverToClientConnector_ = nullptr ;
+         shared_ptr<CGathererConnector> serverFromClientConnector_ ;
+         shared_ptr<CDistributedElement> elementFrom_ ;
+       public:
+         shared_ptr<CGathererConnector> getServerFromClientConnector(void) { return serverFromClientConnector_ ;}
+
+       private:
+         shared_ptr<CScattererConnector>  serverToClientConnector_ = nullptr ;
        public: 
-         CScattererConnector* getServerToClientConnector(void) { return serverToClientConnector_ ;} 
-
-       private:
-         map<CContextClient*,CGathererConnector*>  clientFromServerConnector_  ;
+         shared_ptr<CScattererConnector> getServerToClientConnector(void) { return serverToClientConnector_ ;} 
+
+       private:
+         map<CContextClient*,shared_ptr<CGathererConnector>>  clientFromServerConnector_  ;
        public: 
-         CGathererConnector* getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client] ;}        
+         shared_ptr<CGathererConnector> getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client] ;}        
          
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp	(revision 2267)
@@ -1429,7 +1429,7 @@
     if (posDistributed==elements.size()) posDistributed=0 ; // grid composed only of scalar
     
-    vector<CLocalView*> localViews ;
-    vector<CLocalView*> workflowView ;
-    vector<CDistributedView*> remoteViews ;
+    vector<shared_ptr<CLocalView>> localViews ;
+    vector<shared_ptr<CLocalView>> workflowView ;
+    vector<shared_ptr<CDistributedView>> remoteViews ;
 
     for(int i=0 ; i<elements.size() ; i++)
@@ -1462,9 +1462,9 @@
     
     // CGridClientServerRemoteConnector : workflowView is added to avoid spurious optimisation with only the fullview
-    CGridClientServerRemoteConnector gridRemoteConnector(localViews, workflowView, remoteViews, context->getIntraComm(), client->getRemoteSize()) ;
-    gridRemoteConnector.computeConnector() ;
+    auto gridRemoteConnector = make_shared<CGridClientServerRemoteConnector>(localViews, workflowView, remoteViews, context->getIntraComm(), client->getRemoteSize()) ;
+    gridRemoteConnector->computeConnector() ;
     
-    vector<CScattererConnector*> scattererConnectors ;
-    CScattererConnector* scattererConnector;
+    vector<shared_ptr<CScattererConnector>> scattererConnectors ;
+    shared_ptr<CScattererConnector> scattererConnector;
     for(int i=0 ; i<elements.size() ; i++)
     {
@@ -1472,9 +1472,9 @@
       { 
         CDomain* domain = (CDomain*) elements[i].ptr ;
-        if (isCoupling) domain->distributeToServer(client, gridRemoteConnector.getDistributedGlobalIndex(i), scattererConnector,  domain->getCouplingAlias(fieldId,i)) ;
+        if (isCoupling) domain->distributeToServer(client, gridRemoteConnector->getDistributedGlobalIndex(i), scattererConnector,  domain->getCouplingAlias(fieldId,i)) ;
         else 
         {
           sendAddDomain(domain->getId(),client) ;
-          domain->distributeToServer(client, gridRemoteConnector.getDistributedGlobalIndex(i), scattererConnector) ;
+          domain->distributeToServer(client, gridRemoteConnector->getDistributedGlobalIndex(i), scattererConnector) ;
         }
         scattererConnectors.push_back(scattererConnector) ;
@@ -1483,9 +1483,9 @@
       {
         CAxis* axis = (CAxis*) elements[i].ptr ;
-        if (isCoupling) axis->distributeToServer(client, gridRemoteConnector.getDistributedGlobalIndex(i), scattererConnector,  axis->getCouplingAlias(fieldId,i)) ;
+        if (isCoupling) axis->distributeToServer(client, gridRemoteConnector->getDistributedGlobalIndex(i), scattererConnector,  axis->getCouplingAlias(fieldId,i)) ;
         else 
         {
           sendAddAxis(axis->getId(),client) ;
-          axis->distributeToServer(client, gridRemoteConnector.getDistributedGlobalIndex(i), scattererConnector) ;
+          axis->distributeToServer(client, gridRemoteConnector->getDistributedGlobalIndex(i), scattererConnector) ;
         }
         scattererConnectors.push_back(scattererConnector) ;
@@ -1494,9 +1494,9 @@
       {
         CScalar* scalar = (CScalar*) elements[i].ptr ;
-        if (isCoupling) scalar->distributeToServer(client, gridRemoteConnector.getDistributedGlobalIndex(i), scattererConnector,  scalar->getCouplingAlias(fieldId,i)) ;
+        if (isCoupling) scalar->distributeToServer(client, gridRemoteConnector->getDistributedGlobalIndex(i), scattererConnector,  scalar->getCouplingAlias(fieldId,i)) ;
         else 
         {
           sendAddScalar(scalar->getId(),client) ;
-          scalar->distributeToServer(client, gridRemoteConnector.getDistributedGlobalIndex(i), scattererConnector) ;
+          scalar->distributeToServer(client, gridRemoteConnector->getDistributedGlobalIndex(i), scattererConnector) ;
         }
         scattererConnectors.push_back(scattererConnector) ;
@@ -1504,6 +1504,6 @@
     }
 
-    CGridScattererConnector gridScattererConnector(scattererConnectors) ;
-    CGridLocalConnector* workflowToFull = getGridLocalElements()->getConnector(CElementView::WORKFLOW, CElementView::FULL) ;
+    auto gridScattererConnector = make_shared<CGridScattererConnector>(scattererConnectors) ;
+    shared_ptr<CGridLocalConnector> workflowToFull = getGridLocalElements()->getConnector(CElementView::WORKFLOW, CElementView::FULL) ;
     CArray<bool,1> maskIn(workflowToFull->getSrcSize()) ;
     CArray<bool,1> maskOut(workflowToFull->getDstSize()) ;
@@ -1515,9 +1515,8 @@
     if (isCoupling) message<<getCouplingAlias(fieldId) ;
     else message<<getId() ; 
-    gridScattererConnector.transfer(maskOut, client, event, message) ;
-    for(auto& it : scattererConnectors) delete it ;
-
-    vector<CScattererConnector*> clientToServerConnectors ;
-    vector<CGathererConnector*>  clientFromServerConnectors ;
+    gridScattererConnector->transfer(maskOut, client, event, message) ;
+   
+    vector<shared_ptr<CScattererConnector>> clientToServerConnectors ;
+    vector<shared_ptr<CGathererConnector>>  clientFromServerConnectors ;
     for(auto& element : elements)
     {
@@ -1541,6 +1540,6 @@
     
     // compute the grid clientToServerConnector to send flux from client to servers
-    clientToServerConnector_[client] = new CGridScattererConnector(clientToServerConnectors) ;
-    clientFromServerConnector_[client] = new CGridGathererConnector(clientFromServerConnectors) ;
+    clientToServerConnector_[client] = make_shared<CGridScattererConnector>(clientToServerConnectors) ;
+    clientFromServerConnector_[client] = make_shared<CGridGathererConnector>(clientFromServerConnectors) ;
 
   }
@@ -1556,6 +1555,6 @@
   void CGrid::receiveMask(CEventServer& event)
   {
-    vector<CGathererConnector*> gathererConnectors ;
-    vector<CLocalView*> fullViews ;
+    vector<shared_ptr<CGathererConnector>> gathererConnectors ;
+    vector<shared_ptr<CLocalView>> fullViews ;
 
     for(auto& element : getElements())
@@ -1578,10 +1577,10 @@
       }
     }
-    CGridGathererConnector gridGathererConnector(gathererConnectors) ;
-    CGridMaskConnector gridMaskConnector(fullViews) ;
+    auto gridGathererConnector = make_shared<CGridGathererConnector>(gathererConnectors) ;
+    auto gridMaskConnector = make_shared<CGridMaskConnector>(fullViews) ;
 
     CArray<bool,1> maskOut ;
-    gridGathererConnector.transfer_or(event,maskOut) ;
-    gridMaskConnector.computeConnector(maskOut) ;
+    gridGathererConnector->transfer_or(event,maskOut) ;
+    gridMaskConnector->computeConnector(maskOut) ;
 
     CContextClient* client = event.getContextServer()->getAssociatedClient() ;
@@ -1589,7 +1588,7 @@
     for(auto& element : getElements())
     {
-      if (element.type==TYPE_DOMAIN) element.domain->setServerMask(gridMaskConnector.getElementMask(i),client);
-      else if (element.type==TYPE_AXIS) element.axis->setServerMask(gridMaskConnector.getElementMask(i),client);
-      else if (element.type==TYPE_SCALAR) element.scalar->setServerMask(gridMaskConnector.getElementMask(i),client);
+      if (element.type==TYPE_DOMAIN) element.domain->setServerMask(gridMaskConnector->getElementMask(i),client);
+      else if (element.type==TYPE_AXIS) element.axis->setServerMask(gridMaskConnector->getElementMask(i),client);
+      else if (element.type==TYPE_SCALAR) element.scalar->setServerMask(gridMaskConnector->getElementMask(i),client);
       i++ ;
     }
@@ -2310,5 +2309,5 @@
     auto axis=axisList.begin() ;
     auto scalar=scalarList.begin() ;
-    vector<CLocalElement*> elements;
+    vector<shared_ptr<CLocalElement>> elements;
     for(auto order : order_)
     {
@@ -2332,7 +2331,7 @@
     {
       vector<bool> mask(getMask().getVector()) ;
-      gridLocalElements_ = new CGridLocalElements(elements, mask) ;  
-    }
-    else gridLocalElements_ = new CGridLocalElements(elements) ;  
+      gridLocalElements_ = make_shared<CGridLocalElements>(elements, mask) ;  
+    }
+    else gridLocalElements_ = make_shared<CGridLocalElements>(elements) ;  
   }
 
@@ -2359,5 +2358,5 @@
   void CGrid::computeServerFromClientConnector(void)
   {
-    vector<CGathererConnector*> connectors ;
+    vector<shared_ptr<CGathererConnector>> connectors ;
     for(auto& element : getElements())
     {
@@ -2366,10 +2365,10 @@
       else if (element.type==TYPE_SCALAR) connectors.push_back(element.scalar->getServerFromClientConnector()) ; 
     }
-    serverFromClientConnector_ = new CGridGathererConnector(connectors) ;
+    serverFromClientConnector_ = make_shared<CGridGathererConnector>(connectors) ;
   }
 
   void CGrid::computeServerToClientConnector(void)
   {
-    vector<CScattererConnector*> connectors ;
+    vector<shared_ptr<CScattererConnector>> connectors ;
     for(auto& element : getElements())
     {
@@ -2378,10 +2377,10 @@
       else if (element.type==TYPE_SCALAR) connectors.push_back(element.scalar->getServerToClientConnector()) ; 
     }
-    serverToClientConnector_ = new CGridScattererConnector(connectors) ;
+    serverToClientConnector_ = make_shared<CGridScattererConnector>(connectors) ;
   }
 
   void CGrid::computeClientFromClientConnector(void)
   {
-    vector<CGathererConnector*> connectors ;
+    vector<shared_ptr<CGathererConnector>> connectors ;
     for(auto& element : getElements())
     {
@@ -2390,5 +2389,5 @@
       else if (element.type==TYPE_SCALAR) connectors.push_back(element.scalar->getServerFromClientConnector()) ; 
     }
-    clientFromClientConnector_ = new CGridGathererConnector(connectors) ;
+    clientFromClientConnector_ = make_shared<CGridGathererConnector>(connectors) ;
   }
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp	(revision 2267)
@@ -328,20 +328,20 @@
 
       private:  
-        CGridLocalElements* gridLocalElements_= nullptr ;
+       shared_ptr<CGridLocalElements> gridLocalElements_= nullptr ;
         void computeGridLocalElements(void) ;
       public:
-        CGridLocalElements* getGridLocalElements(void) { if (gridLocalElements_==nullptr) computeGridLocalElements() ; return gridLocalElements_ ;}
-
-      private:
-        CGridLocalConnector* modelToWorkflowConnector_ = nullptr ;
+        shared_ptr<CGridLocalElements> getGridLocalElements(void) { if (gridLocalElements_==nullptr) computeGridLocalElements() ; return gridLocalElements_ ;}
+
+      private:
+        shared_ptr<CGridLocalConnector> modelToWorkflowConnector_ = nullptr ;
       public:
         void computeModelToWorkflowConnector(void) ;
-        CGridLocalConnector* getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_;}
-
-      private:
-        CGridLocalConnector* workflowToModelConnector_ = nullptr;
+        shared_ptr<CGridLocalConnector> getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_;}
+
+      private:
+        shared_ptr<CGridLocalConnector> workflowToModelConnector_ = nullptr;
       public:
         void computeWorkflowToModelConnector(void) ;
-        CGridLocalConnector* getWorkflowToModelConnector(void) { if (workflowToModelConnector_==nullptr) computeWorkflowToModelConnector() ; return workflowToModelConnector_;}
+        shared_ptr<CGridLocalConnector> getWorkflowToModelConnector(void) { if (workflowToModelConnector_==nullptr) computeWorkflowToModelConnector() ; return workflowToModelConnector_;}
 
       public: //? 
@@ -350,49 +350,49 @@
             
       private:
-        CGridLocalConnector* workflowToFullConnector_ = nullptr;
+        shared_ptr<CGridLocalConnector> workflowToFullConnector_ = nullptr;
       public:
         void computeWorkflowToFullConnector(void) ;
-        CGridLocalConnector* getWorkflowToFullConnector(void) { if (workflowToFullConnector_==nullptr) computeWorkflowToFullConnector() ; return workflowToFullConnector_;}
-
-      private:
-        CGridLocalConnector* fullToWorkflowConnector_ = nullptr;
+        shared_ptr<CGridLocalConnector> getWorkflowToFullConnector(void) { if (workflowToFullConnector_==nullptr) computeWorkflowToFullConnector() ; return workflowToFullConnector_;}
+
+      private:
+        shared_ptr<CGridLocalConnector> fullToWorkflowConnector_ = nullptr;
       public:
         void computeFullToWorkflowConnector(void) ;
-        CGridLocalConnector* getFullToWorkflowConnector(void) { if (fullToWorkflowConnector_==nullptr) computeFullToWorkflowConnector() ; return fullToWorkflowConnector_;}
+        shared_ptr<CGridLocalConnector> getFullToWorkflowConnector(void) { if (fullToWorkflowConnector_==nullptr) computeFullToWorkflowConnector() ; return fullToWorkflowConnector_;}
 
     
 
       private:
-         CGridGathererConnector* clientFromClientConnector_ = nullptr ;
-      public:
-         CGridGathererConnector* getClientFromClientConnector(void) { if (clientFromClientConnector_==nullptr) computeClientFromClientConnector() ; return clientFromClientConnector_;}
+         shared_ptr<CGridGathererConnector> clientFromClientConnector_ = nullptr ;
+      public:
+         shared_ptr<CGridGathererConnector> getClientFromClientConnector(void) { if (clientFromClientConnector_==nullptr) computeClientFromClientConnector() ; return clientFromClientConnector_;}
          void computeClientFromClientConnector(void) ;
 
       private:
-         map<CContextClient*, CGridScattererConnector*> clientToClientConnector_ ;
-      public:
-         CGridScattererConnector* getClientToClientConnector(CContextClient* client) { return clientToClientConnector_[client] ;} // make some test to see if connector exits for the given client
+         map<CContextClient*, shared_ptr<CGridScattererConnector>> clientToClientConnector_ ;
+      public:
+         shared_ptr<CGridScattererConnector> getClientToClientConnector(CContextClient* client) { return clientToClientConnector_[client] ;} // make some test to see if connector exits for the given client
   
 
       private:
-         map<CContextClient*,CGridGathererConnector*> clientFromServerConnector_  ;
-      public:
-         CGridGathererConnector* getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client];}
+         map<CContextClient*,shared_ptr<CGridGathererConnector>> clientFromServerConnector_  ;
+      public:
+         shared_ptr<CGridGathererConnector> getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client];}
          void computeClientFromServerConnector(void) ;
 
       private:
-         CGridScattererConnector* serverToClientConnector_=nullptr ;
-      public:
-         CGridScattererConnector* getServerToClientConnector(void) { if (serverToClientConnector_==nullptr) computeServerToClientConnector() ; return serverToClientConnector_;}
+         shared_ptr<CGridScattererConnector> serverToClientConnector_=nullptr ;
+      public:
+         shared_ptr<CGridScattererConnector> getServerToClientConnector(void) { if (serverToClientConnector_==nullptr) computeServerToClientConnector() ; return serverToClientConnector_;}
          void computeServerToClientConnector(void) ;
       private:
-         map<CContextClient*, CGridScattererConnector*> clientToServerConnector_ ;
-      public:
-         CGridScattererConnector* getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;} // make some test to see if connector exits for the given client
+         map<CContextClient*, shared_ptr<CGridScattererConnector>> clientToServerConnector_ ;
+      public:
+         shared_ptr<CGridScattererConnector> getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;} // make some test to see if connector exits for the given client
          
       private:
-         CGridGathererConnector* serverFromClientConnector_ = nullptr ;
-      public:
-         CGridGathererConnector* getServerFromClientConnector(void) { if (serverFromClientConnector_==nullptr) computeServerFromClientConnector() ; return serverFromClientConnector_;}
+         shared_ptr<CGridGathererConnector> serverFromClientConnector_ = nullptr ;
+      public:
+         shared_ptr<CGridGathererConnector> getServerFromClientConnector(void) { if (serverFromClientConnector_==nullptr) computeServerFromClientConnector() ; return serverFromClientConnector_;}
          void computeServerFromClientConnector(void) ;
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.cpp	(revision 2267)
@@ -346,5 +346,5 @@
       CArray<size_t,1> index(n) ;
       if (n==1) index(0)=0 ;
-      localElement_ = new CLocalElement(rank, 1, index) ;
+      localElement_ = make_shared<CLocalElement>(rank, 1, index) ;
    }
 
@@ -377,7 +377,7 @@
    void CScalar::computeModelToWorkflowConnector(void)
    { 
-     CLocalView* srcView=getLocalView(CElementView::MODEL) ;
-     CLocalView* dstView=getLocalView(CElementView::WORKFLOW) ;
-     modelToWorkflowConnector_ = new CLocalConnector(srcView, dstView); 
+     shared_ptr<CLocalView> srcView=getLocalView(CElementView::MODEL) ;
+     shared_ptr<CLocalView> dstView=getLocalView(CElementView::WORKFLOW) ;
+     modelToWorkflowConnector_ = make_shared<CLocalConnector>(srcView, dstView); 
      modelToWorkflowConnector_->computeConnector() ;
    }
@@ -409,10 +409,10 @@
       for (auto& rankServer : client->getRanksServerLeader()) globalIndex[rankServer].reference(indGlo.copy()) ; 
     }
-    remoteElement_[client] = new CDistributedElement(nglo, globalIndex) ;
+    remoteElement_[client] = make_shared<CDistributedElement>(nglo, globalIndex) ;
     remoteElement_[client]->addFullView() ;
   }
  
   void CScalar::distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, 
-                                   CScattererConnector* &scattererConnector, const string& scalarId)
+                                   shared_ptr<CScattererConnector> &scattererConnector, const string& scalarId)
   {
     string serverScalarId = scalarId.empty() ? this->getId() : scalarId ;
@@ -421,8 +421,8 @@
     this->sendAllAttributesToServer(client, serverScalarId)  ;
 
-    CDistributedElement scatteredElement(1,globalIndex) ;
-    scatteredElement.addFullView() ;
-    scattererConnector = new CScattererConnector(localElement_->getView(CElementView::FULL), scatteredElement.getView(CElementView::FULL), 
-                                                 context->getIntraComm(), client->getRemoteSize()) ;
+    auto scatteredElement = make_shared<CDistributedElement>(1,globalIndex) ;
+    scatteredElement->addFullView() ;
+    scattererConnector = make_shared<CScattererConnector>(localElement_->getView(CElementView::FULL), scatteredElement->getView(CElementView::FULL), 
+                                                          context->getIntraComm(), client->getRemoteSize()) ;
     scattererConnector->computeConnector() ;
     
@@ -441,13 +441,13 @@
     scattererConnector->transfer(localElement_->getView(CElementView::FULL)->getGlobalIndex(),client,event1,message1) ;
 
-    sendDistributedAttributes(client, *scattererConnector, scalarId) ;
+    sendDistributedAttributes(client, scattererConnector, scalarId) ;
   
     // phase 2 send the mask : data index + mask2D
     CArray<bool,1> maskIn(localElement_->getView(CElementView::WORKFLOW)->getSize());
     CArray<bool,1> maskOut ;
-    CLocalConnector workflowToFull(localElement_->getView(CElementView::WORKFLOW), localElement_->getView(CElementView::FULL)) ;
-    workflowToFull.computeConnector() ;
+    auto workflowToFull = make_shared<CLocalConnector>(localElement_->getView(CElementView::WORKFLOW), localElement_->getView(CElementView::FULL)) ;
+    workflowToFull->computeConnector() ;
     maskIn=true ;
-    workflowToFull.transfer(maskIn,maskOut,false) ;
+    workflowToFull->transfer(maskIn,maskOut,false) ;
 
     // phase 3 : prepare grid scatterer connector to send data from client to server
@@ -455,18 +455,18 @@
     map<int,CArray<bool,1>> maskOut2 ; 
     scattererConnector->transfer(maskOut, maskOut2) ;
-    scatteredElement.addView(CElementView::WORKFLOW, maskOut2) ;
-    scatteredElement.getView(CElementView::WORKFLOW)->getGlobalIndexView(workflowGlobalIndex) ;
+    scatteredElement->addView(CElementView::WORKFLOW, maskOut2) ;
+    scatteredElement->getView(CElementView::WORKFLOW)->getGlobalIndexView(workflowGlobalIndex) ;
     // create new workflow view for scattered element
-    CDistributedElement clientToServerElement(scatteredElement.getGlobalSize(), workflowGlobalIndex) ;
-    clientToServerElement.addFullView() ;
+    auto clientToServerElement = make_shared<CDistributedElement>(scatteredElement->getGlobalSize(), workflowGlobalIndex) ;
+    clientToServerElement->addFullView() ;
     CEventClient event2(getType(), EVENT_ID_SCALAR_DISTRIBUTION);
     CMessage message2 ;
     message2<<serverScalarId<<2 ; 
-    clientToServerElement.sendToServer(client, event2, message2) ; 
-    clientToServerConnector_[client] = new CScattererConnector(localElement_->getView(CElementView::WORKFLOW), clientToServerElement.getView(CElementView::FULL),
-                                                               context->getIntraComm(), client->getRemoteSize()) ;
+    clientToServerElement->sendToServer(client, event2, message2) ; 
+    clientToServerConnector_[client] = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), clientToServerElement->getView(CElementView::FULL),
+                                                                        context->getIntraComm(), client->getRemoteSize()) ;
     clientToServerConnector_[client]->computeConnector() ;
 
-    clientFromServerConnector_[client] = new CGathererConnector(clientToServerElement.getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW));
+    clientFromServerConnector_[client] = make_shared<CGathererConnector>(clientToServerElement->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW));
     clientFromServerConnector_[client]->computeConnector() ;
 
@@ -489,5 +489,5 @@
     if (phasis==0) // receive the remote element to construct the full view
     {
-      localElement_ = new  CLocalElement(context->getIntraCommRank(),event) ;
+      localElement_ = make_shared<CLocalElement>(context->getIntraCommRank(),event) ;
       localElement_->addFullView() ;
       // construct the local dimension and indexes
@@ -499,7 +499,7 @@
     {
       CContext* context = CContext::getCurrent();
-      CDistributedElement* elementFrom = new  CDistributedElement(event) ;
+      shared_ptr<CDistributedElement> elementFrom = make_shared<CDistributedElement>(event) ;
       elementFrom->addFullView() ;
-      gathererConnector_ = new CGathererConnector(elementFrom->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
+      gathererConnector_ = make_shared<CGathererConnector>(elementFrom->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
       gathererConnector_->computeConnector() ; 
     }
@@ -507,7 +507,7 @@
     {
 //      delete gathererConnector_ ;
-      elementFrom_ = new  CDistributedElement(event) ;
+      elementFrom_ = make_shared<CDistributedElement>(event) ;
       elementFrom_->addFullView() ;
-//      gathererConnector_ =  new CGathererConnector(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
+//      gathererConnector_ =  make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::FULL)) ;
 //      gathererConnector_ -> computeConnector() ;
     }
@@ -522,14 +522,14 @@
     if (serverMask.numElements()==1) mask = serverMask(0) ;
  
-    serverFromClientConnector_ = new CGathererConnector(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ;
+    serverFromClientConnector_ = make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ;
     serverFromClientConnector_->computeConnector() ;
       
-    serverToClientConnector_ = new CScattererConnector(localElement_->getView(CElementView::WORKFLOW), elementFrom_->getView(CElementView::FULL),
-                                                         context->getIntraComm(), client->getRemoteSize()) ;
+    serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementFrom_->getView(CElementView::FULL),
+                                                                context->getIntraComm(), client->getRemoteSize()) ;
     serverToClientConnector_->computeConnector() ;
   }
   CATCH_DUMP_ATTR
 
-  void CScalar::sendDistributedAttributes(CContextClient* client, CScattererConnector& scattererConnector, const string& scalarId)
+  void CScalar::sendDistributedAttributes(CContextClient* client, shared_ptr<CScattererConnector> scattererConnector, const string& scalarId)
   {
     string serverScalarId = scalarId.empty() ? this->getId() : scalarId ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp	(revision 2267)
@@ -175,10 +175,10 @@
     //////////////////////////////////////////////////////////////////////////////////////
     private:
-      CLocalElement* localElement_ = nullptr ;
+      shared_ptr<CLocalElement> localElement_ = nullptr ;
       void initializeLocalElement(void) ;
        
     public:  
-      CLocalElement* getLocalElement(void) { if (localElement_==nullptr) initializeLocalElement() ; return localElement_ ; }
-      CLocalView* getLocalView(CElementView::type type) { return getLocalElement()->getView(type) ;}
+      shared_ptr<CLocalElement> getLocalElement(void) { if (localElement_==nullptr) initializeLocalElement() ; return localElement_ ; }
+      shared_ptr<CLocalView> getLocalView(CElementView::type type) { return getLocalElement()->getView(type) ;}
        
     private:  
@@ -188,12 +188,12 @@
         
     private:
-      CLocalConnector* modelToWorkflowConnector_ ;
+      shared_ptr<CLocalConnector> modelToWorkflowConnector_ ;
       void computeModelToWorkflowConnector(void)  ;
     public:
-      CLocalConnector* getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_ ;}
+      shared_ptr<CLocalConnector> getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_ ;}
 
     public:
       void computeRemoteElement(CContextClient* client, EDistributionType) ;
-      void distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, CScattererConnector* &scattererConnector,
+      void distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndex, shared_ptr<CScattererConnector> &scattererConnector,
                                  const string& scalarId="") ;
 
@@ -201,36 +201,36 @@
       void receivedScalarDistribution(CEventServer& event, int phasis) ;
       void setServerMask(CArray<bool,1>& serverMask, CContextClient* client) ;
-      void sendDistributedAttributes(CContextClient* client, CScattererConnector& scattererConnector, const string& scalarId) ;
+      void sendDistributedAttributes(CContextClient* client, shared_ptr<CScattererConnector> scattererConnector, const string& scalarId) ;
       static void recvDistributedAttributes(CEventServer& event) ;
       void recvDistributedAttributes(CEventServer& event, const string& type) ;
 
     private:
-      map<CContextClient*, CDistributedElement*> remoteElement_ ;
-    public: 
-      CDistributedElement* getRemoteElement(CContextClient* client) {return remoteElement_[client] ;}
-    private:
-      map<CContextClient*, CScattererConnector*> clientToServerConnector_ ;
-    public: 
-      CScattererConnector* getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;}
-
-    private:
-      CGathererConnector*  gathererConnector_ ;
-    public:
-      CGathererConnector* getGathererConnector(void) { return gathererConnector_ ;}
-    private:
-      CGathererConnector* serverFromClientConnector_ ;
-      CDistributedElement* elementFrom_ ;
-    public:
-      CGathererConnector* getServerFromClientConnector(void) { return serverFromClientConnector_ ;}
-
-    private:
-      CScattererConnector*  serverToClientConnector_ = nullptr ;
-    public: 
-      CScattererConnector* getServerToClientConnector(void) { return serverToClientConnector_ ;} 
-
-    private:
-      map<CContextClient*,CGathererConnector*>  clientFromServerConnector_  ;
-    public: 
-      CGathererConnector* getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client] ;} 
+      map<CContextClient*, shared_ptr<CDistributedElement>> remoteElement_ ;
+    public: 
+      shared_ptr<CDistributedElement> getRemoteElement(CContextClient* client) {return remoteElement_[client] ;}
+    private:
+      map<CContextClient*, shared_ptr<CScattererConnector>> clientToServerConnector_ ;
+    public: 
+      shared_ptr<CScattererConnector> getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;}
+
+    private:
+      shared_ptr<CGathererConnector>  gathererConnector_ ;
+    public:
+      shared_ptr<CGathererConnector> getGathererConnector(void) { return gathererConnector_ ;}
+    private:
+      shared_ptr<CGathererConnector> serverFromClientConnector_ ;
+      shared_ptr<CDistributedElement> elementFrom_ ;
+    public:
+      shared_ptr<CGathererConnector> getServerFromClientConnector(void) { return serverFromClientConnector_ ;}
+
+    private:
+     shared_ptr<CScattererConnector>  serverToClientConnector_ = nullptr ;
+    public: 
+      shared_ptr<CScattererConnector> getServerToClientConnector(void) { return serverToClientConnector_ ;} 
+
+    private:
+      map<CContextClient*,shared_ptr<CGathererConnector>>  clientFromServerConnector_  ;
+    public: 
+      shared_ptr<CGathererConnector> getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client] ;} 
 
     private:
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.cpp	(revision 2267)
@@ -6,8 +6,8 @@
 
 
-  void CAlgorithmTransformationReduce::computeAlgorithm(CLocalView* srcView, CLocalView* dstView)
+  void CAlgorithmTransformationReduce::computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView)
  {
     this->computeRecvElement(srcView, dstView) ;
-    reduceTransformConnector_ = new  CReduceTransformConnector( recvElement_->getView(CElementView::FULL), dstView, operator_, transformationMapping_, detectMissingValue_) ; 
+    reduceTransformConnector_ = make_shared<CReduceTransformConnector>(recvElement_->getView(CElementView::FULL), dstView, operator_, transformationMapping_, detectMissingValue_) ; 
   }
  
@@ -18,5 +18,5 @@
   }
   
-  void CAlgorithmTransformationReduce::computeRecvElement(CLocalView* srcView, CLocalView* dstView)
+  void CAlgorithmTransformationReduce::computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView)
   {
     auto& srcMap = transformationMapping_ ;
@@ -28,5 +28,5 @@
     int i=0 ;
     for(size_t index : srcIndex) { srcArrayIndex(i) = index ; i++ ;}
-    recvElement_ = new CLocalElement(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ;
+    recvElement_ = make_shared<CLocalElement>(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ;
     recvElement_->addFullView() ;
   }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_reduce.hpp	(revision 2267)
@@ -18,13 +18,13 @@
       virtual ~CAlgorithmTransformationReduce() {};
       virtual void apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut);
-      virtual void computeRecvElement(CLocalView* srcView, CLocalView* dstView) ;
+      virtual void computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) ;
       
     protected:
-      virtual void computeAlgorithm(CLocalView* srcView, CLocalView* dstView) ;
+      virtual void computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) ;
        
       //! Map between global index of destination element and source element
       EReduction operator_ ;
       TransformationIndexMap transformationMapping_;
-      CReduceTransformConnector* reduceTransformConnector_ ;
+      shared_ptr<CReduceTransformConnector> reduceTransformConnector_ ;
       bool detectMissingValue_=true ;
       bool eliminateRedondantSrc_ = true ; 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.cpp	(revision 2267)
@@ -8,8 +8,8 @@
 {
  
-  void CAlgorithmTransformationTransfer::computeAlgorithm(CLocalView* srcView, CLocalView* dstView)
+  void CAlgorithmTransformationTransfer::computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView)
   {
    this->computeRecvElement(srcView, dstView) ;
-   transferTransformConnector_ = new  CTransferTransformConnector( recvElement_->getView(CElementView::FULL), dstView, transformationMapping_) ; 
+   transferTransformConnector_ = make_shared<CTransferTransformConnector>( recvElement_->getView(CElementView::FULL), dstView, transformationMapping_) ; 
   }
  
@@ -20,5 +20,5 @@
   }
   
-  void CAlgorithmTransformationTransfer::computeRecvElement(CLocalView* srcView, CLocalView* dstView)
+  void CAlgorithmTransformationTransfer::computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView)
   {
     set<size_t> srcIndex ;
@@ -28,5 +28,5 @@
     int i=0 ;
     for(size_t index : srcIndex) { srcArrayIndex(i) = index ; i++ ;}
-    recvElement_ = new CLocalElement(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ;
+    recvElement_ = make_shared<CLocalElement>(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ;
     recvElement_->addFullView() ;
   }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.hpp	(revision 2267)
@@ -16,13 +16,13 @@
       virtual ~CAlgorithmTransformationTransfer() {};
       virtual void apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut);
-      virtual void computeRecvElement(CLocalView* srcView, CLocalView* dstView) ;
+      virtual void computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) ;
       virtual StdString getAlgoName() {return "\\nCAlgorithm transformation Transfer";}
    
     protected:
-      virtual void computeAlgorithm(CLocalView* srcView, CLocalView* dstView) ;
+      virtual void computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) ;
 
       //! Map between global index of destination element and source element
       unordered_map<int,int> transformationMapping_;
-      CTransferTransformConnector* transferTransformConnector_ ;
+      shared_ptr<CTransferTransformConnector> transferTransformConnector_ ;
   };
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.cpp	(revision 2267)
@@ -6,8 +6,8 @@
 
 
-  void CAlgorithmTransformationWeight::computeAlgorithm(CLocalView* srcView, CLocalView* dstView)
+  void CAlgorithmTransformationWeight::computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView)
   {
     this->computeRecvElement(srcView, dstView) ;
-    weightTransformConnector_ = new  CWeightTransformConnector( recvElement_->getView(CElementView::FULL), dstView, transformationMapping_, transformationWeight_) ; 
+    weightTransformConnector_ = make_shared<CWeightTransformConnector>(recvElement_->getView(CElementView::FULL), dstView, transformationMapping_, transformationWeight_) ; 
   }
  
@@ -18,5 +18,5 @@
   }
 
-  void CAlgorithmTransformationWeight::computeRecvElement(CLocalView* srcView, CLocalView* dstView)
+  void CAlgorithmTransformationWeight::computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView)
   {
     auto& srcMap = transformationMapping_ ;
@@ -28,5 +28,5 @@
     int i=0 ;
     for(size_t index : srcIndex) { srcArrayIndex(i) = index ; i++ ;}
-    recvElement_ = new CLocalElement(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ;
+    recvElement_ = make_shared<CLocalElement>(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ;
     recvElement_->addFullView() ;
   }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.hpp	(revision 2267)
@@ -18,7 +18,7 @@
       virtual ~CAlgorithmTransformationWeight() {};
       virtual void apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut);
-      virtual void computeRecvElement(CLocalView* srcView, CLocalView* dstView);
+      virtual void computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView);
     protected:
-      virtual void computeAlgorithm(CLocalView* srcView, CLocalView* dstView) ;
+      virtual void computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) ;
 
       //! Map between global index of destination element and source element
@@ -26,5 +26,5 @@
       //! Weight corresponding of source to destination
       TransformationWeightMap transformationWeight_;
-      CWeightTransformConnector* weightTransformConnector_ ;
+      shared_ptr<CWeightTransformConnector> weightTransformConnector_ ;
       
   };
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate_coordinate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate_coordinate.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate_coordinate.cpp	(revision 2267)
@@ -106,7 +106,7 @@
     {
       CArray<double,1> coord ;
-      CLocalConnector destConnector(axisDest_->getLocalView(CElementView::FULL), axisDest_->getLocalView(CElementView::WORKFLOW)) ;
-      destConnector.computeConnector() ;
-      destConnector.transfer(axisDest_->value, coord) ;
+      auto destConnector = make_shared<CLocalConnector>(axisDest_->getLocalView(CElementView::FULL), axisDest_->getLocalView(CElementView::WORKFLOW)) ;
+      destConnector->computeConnector() ;
+      destConnector->transfer(axisDest_->value, coord) ;
       destCoordinate_ = vector<double>(coord.dataFirst(), coord.dataFirst()+nDest_) ;
     }
@@ -129,7 +129,7 @@
       CArray<double,1> coord ;
       CArray<double,1> coordGlo ;
-      CLocalConnector srcConnector(axisSrc_->getLocalView(CElementView::FULL), axisSrc_->getLocalView(CElementView::WORKFLOW)) ;
-      srcConnector.computeConnector() ;
-      srcConnector.transfer(axisSrc_->value, coord) ; // full view value -> workflow value
+      auto srcConnector = make_shared<CLocalConnector>(axisSrc_->getLocalView(CElementView::FULL), axisSrc_->getLocalView(CElementView::WORKFLOW)) ;
+      srcConnector->computeConnector() ;
+      srcConnector->transfer(axisSrc_->value, coord) ; // full view value -> workflow value
       transferTransformConnector_ -> transfer(coord, coordGlo) ; // workflow view -> full global view
       srcCoordinate_ = vector<double>(coordGlo.dataFirst(), coordGlo.dataFirst()+ngloSrc_) ;
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.hpp	(revision 2267)
@@ -48,9 +48,9 @@
     typedef std::unordered_map<int, std::vector<double> > TransformationWeightMap;
  
-    CLocalElement* recvElement_=nullptr ;
+    shared_ptr<CLocalElement> recvElement_ ;
     bool isSource_ ;
 
   public:
-    CLocalElement* getRecvElement(void) { return recvElement_ ;}
+    shared_ptr<CLocalElement> getRecvElement(void) { return recvElement_ ;}
   
 };
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.cpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.cpp	(revision 2267)
@@ -18,9 +18,9 @@
   void CGridAlgorithmGeneric::computeAlgorithm(void)
   {
-    CGridLocalElements* gridSrcElements = gridSrc_->getGridLocalElements() ;
-    CGridLocalElements* gridDstElements = gridDst_->getGridLocalElements() ;
+    shared_ptr<CGridLocalElements> gridSrcElements = gridSrc_->getGridLocalElements() ;
+    shared_ptr<CGridLocalElements> gridDstElements = gridDst_->getGridLocalElements() ;
     
-    CGridLocalView* srcView = gridSrcElements->getView(CElementView::WORKFLOW) ;
-    CGridLocalView* dstView = gridDstElements->getView(CElementView::WORKFLOW) ;
+    shared_ptr<CGridLocalView> srcView = gridSrcElements->getView(CElementView::WORKFLOW) ;
+    shared_ptr<CGridLocalView> dstView = gridDstElements->getView(CElementView::WORKFLOW) ;
     MPI_Comm comm = CContext::getCurrent()->getIntraComm() ;
     int commSize = CContext::getCurrent()->getIntraCommSize() ;
@@ -29,6 +29,6 @@
     auto& elements =  gridSrcElements->getElements() ;
     int nElements = elements.size() ;
-    vector<CLocalElement*> remoteElements(nElements) ;
-    vector<CLocalView*> remoteViews(nElements) ;
+    vector<shared_ptr<CLocalElement>> remoteElements(nElements) ;
+    vector<shared_ptr<CLocalView>> remoteViews(nElements) ;
     for(int i=0;i<nElements;i++)
     {
@@ -38,5 +38,5 @@
         CArray<size_t,1> globalIndexView ;
         srcView->getView(i)->getGlobalIndexView(globalIndexView) ;
-        remoteElements[i] = new CLocalElement(commRank, srcView->getView(i)->getGlobalSize(),globalIndexView) ;
+        remoteElements[i] = make_shared<CLocalElement>(commRank, srcView->getView(i)->getGlobalSize(),globalIndexView) ;
         remoteElements[i]->addFullView() ;
         if (i>pos_) dimBefore_ *= srcView->getView(i)->getSize() ;
@@ -47,5 +47,5 @@
     }
 
-    gridTransformConnector_ = new CGridTransformConnector(srcView->getViews(), remoteViews, comm ) ;
+    gridTransformConnector_ = make_shared<CGridTransformConnector>(srcView->getViews(), remoteViews, comm ) ;
  
   }
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.hpp	(revision 2266)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.hpp	(revision 2267)
@@ -31,5 +31,5 @@
     
   protected:
-    CGridTransformConnector* gridTransformConnector_=nullptr ;
+    shared_ptr<CGridTransformConnector> gridTransformConnector_=nullptr ;
     CGrid* gridSrc_ = nullptr ;
     CGrid* gridDst_ = nullptr ;
