Ignore:
Timestamp:
12/01/21 16:52:24 (3 years ago)
Author:
ymipsl
Message:

tracking memory leak
Elements, views, and connectors are now managed with shared pointer.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_weight.cpp

    r2001 r2267  
    66 
    77 
    8   void CAlgorithmTransformationWeight::computeAlgorithm(CLocalView* srcView, CLocalView* dstView) 
     8  void CAlgorithmTransformationWeight::computeAlgorithm(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) 
    99  { 
    1010    this->computeRecvElement(srcView, dstView) ; 
    11     weightTransformConnector_ = new  CWeightTransformConnector( recvElement_->getView(CElementView::FULL), dstView, transformationMapping_, transformationWeight_) ;  
     11    weightTransformConnector_ = make_shared<CWeightTransformConnector>(recvElement_->getView(CElementView::FULL), dstView, transformationMapping_, transformationWeight_) ;  
    1212  } 
    1313  
     
    1818  } 
    1919 
    20   void CAlgorithmTransformationWeight::computeRecvElement(CLocalView* srcView, CLocalView* dstView) 
     20  void CAlgorithmTransformationWeight::computeRecvElement(shared_ptr<CLocalView> srcView, shared_ptr<CLocalView> dstView) 
    2121  { 
    2222    auto& srcMap = transformationMapping_ ; 
     
    2828    int i=0 ; 
    2929    for(size_t index : srcIndex) { srcArrayIndex(i) = index ; i++ ;} 
    30     recvElement_ = new CLocalElement(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ; 
     30    recvElement_ = make_shared<CLocalElement>(CContext::getCurrent()->getIntraCommRank(), srcView->getGlobalSize(), srcArrayIndex) ; 
    3131    recvElement_->addFullView() ; 
    3232  } 
Note: See TracChangeset for help on using the changeset viewer.