Index: XIOS3/trunk/src/event_scheduler.cpp
===================================================================
--- XIOS3/trunk/src/event_scheduler.cpp	(revision 2563)
+++ XIOS3/trunk/src/event_scheduler.cpp	(revision 2564)
@@ -3,4 +3,5 @@
 #include "mpi.hpp"
 #include "tracer.hpp"
+#include "cxios.hpp"
 
 namespace xios
@@ -27,4 +28,5 @@
   {
     MPI_Comm_dup(comm, &communicator_) ;
+    CXios::getMpiGarbageCollector().registerCommunicator(communicator_) ;
     MPI_Comm_size(communicator_,&mpiSize_) ;
     MPI_Comm_rank(communicator_,&mpiRank_);
@@ -100,4 +102,5 @@
     else color=0 ;
     MPI_Comm_split(communicator_, color, mpiRank_, &newComm) ;
+    CXios::getMpiGarbageCollector().registerCommunicator(newComm) ;
 
     parent = make_shared<CEventScheduler>(newComm , schedulerLevel_) ;
Index: XIOS3/trunk/src/node/context.cpp
===================================================================
--- XIOS3/trunk/src/node/context.cpp	(revision 2563)
+++ XIOS3/trunk/src/node/context.cpp	(revision 2564)
@@ -77,4 +77,6 @@
      if (registryIn!=nullptr) delete registryIn ;
      if (registryOut!=nullptr) delete registryOut ;
+
+     if (onlineContextClient_!=nullptr) delete onlineContextClient_;
    }
 
Index: XIOS3/trunk/src/transport/context_client.hpp
===================================================================
--- XIOS3/trunk/src/transport/context_client.hpp	(revision 2563)
+++ XIOS3/trunk/src/transport/context_client.hpp	(revision 2564)
@@ -35,4 +35,5 @@
             // Contructor
       CContextClient(CContext* parent, MPI_Comm intraComm, MPI_Comm interComm, CContext* parentServer = 0);
+      virtual ~CContextClient() {} 
 
       bool isServerLeader(void) const;
Index: XIOS3/trunk/src/transport/context_server.hpp
===================================================================
--- XIOS3/trunk/src/transport/context_server.hpp	(revision 2563)
+++ XIOS3/trunk/src/transport/context_server.hpp	(revision 2564)
@@ -22,5 +22,5 @@
     
     CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ;
-    ~CContextServer() {} 
+    virtual ~CContextServer() {} 
     void setAssociatedClient(CContextClient* associatedClient) {associatedClient_=associatedClient ;}
     CContextClient* getAssociatedClient(void) { return associatedClient_ ;}
Index: XIOS3/trunk/src/transport/p2p_server_buffer.cpp
===================================================================
--- XIOS3/trunk/src/transport/p2p_server_buffer.cpp	(revision 2563)
+++ XIOS3/trunk/src/transport/p2p_server_buffer.cpp	(revision 2564)
@@ -113,5 +113,10 @@
 
     if (buffers_.size()>1) 
-     if (buffers_.front()->getCount()==0) buffers_.pop_front() ; // if buffer is empty free buffer
+    {
+      if (buffers_.front()->getCount()==0) {
+        delete buffers_.front();
+        buffers_.pop_front() ; // if buffer is empty free buffer
+      }
+    }
   }
 
@@ -422,5 +427,12 @@
       bloc.buffer->free(bloc.start, bloc.count) ; // free bloc
       addr=bloc.addr ;
-      if (bloc.buffer->getCount()==0) if (buffers_.size() > 1) buffers_.pop_front() ; // if buffer is empty free buffer
+      if (bloc.buffer->getCount()==0)
+      {
+        if (buffers_.size() > 1)
+        {
+          delete buffers_.front();
+          buffers_.pop_front() ; // if buffer is empty free buffer
+        }
+      }
     }
     event.push(clientRank_, nullptr, buffer, size) ;
Index: XIOS3/trunk/src/transport/p2p_server_buffer.hpp
===================================================================
--- XIOS3/trunk/src/transport/p2p_server_buffer.hpp	(revision 2563)
+++ XIOS3/trunk/src/transport/p2p_server_buffer.hpp	(revision 2564)
@@ -36,5 +36,5 @@
           { 
             if (count_>0) ERROR("COneSidedServerBuffer::~CBuffer()",<<"Try to delete buffer that is not empty"<<std::endl) ;
-            MPI_Free_mem(&buffer_) ;
+            MPI_Free_mem(buffer_) ;
           }
        
@@ -106,4 +106,12 @@
                              map<size_t, SPendingEvent>& completedEvents, vector<char>& buffer)  ;
       
+      ~CP2pServerBuffer()
+      {
+          while (!buffers_.empty()) {
+              delete buffers_.front();
+              buffers_.pop_front() ; // if buffer is empty free buffer
+          }
+      };
+
       void receivedRequest(vector<char>& buffer) ;
       void eventLoop(void) ;
