Ignore:
Timestamp:
12/09/21 12:28:20 (2 years ago)
Author:
ymipsl
Message:

Tracking memory leak : release memory statically alocated

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp

    r2260 r2274  
    4242    name_= poolId+"::"+serviceId+"_"+oss.str(); 
    4343  } 
     44 
     45  CService::~CService() 
     46  { 
     47    delete eventScheduler_ ; 
     48    delete winNotify_ ; 
     49    for(auto& it : contexts_) delete it.second ; 
     50  } 
     51 
    4452 
    4553  void CService::createContext( const std::string& poolId, const std::string& serviceId, const int& partitionId, const std::string& contextId) 
     
    121129      if (it->second->eventLoop(serviceOnly)) 
    122130      { 
     131        delete it->second ;  
    123132        contexts_.erase(it) ; 
    124133        // destroy server_context -> to do later 
     
    235244     auto& arg=notifyInCreateContext_ ; 
    236245     string poolId = get<0>(arg) ; 
    237      string& serviceId = get<1>(arg) ; 
     246     string serviceId = get<1>(arg) ; 
    238247     int partitionId = get<2>(arg) ; 
    239248     string contextId = get<3>(arg) ; 
    240      contexts_[contextId] = new CServerContext(this, serviceComm_, poolId, serviceId, partitionId, contextId) ;  
     249     contexts_[contextId] = new CServerContext(this, serviceComm_, poolId, serviceId, partitionId, contextId) ; 
    241250   } 
    242251 
Note: See TracChangeset for help on using the changeset viewer.