Ignore:
Timestamp:
12/07/21 12:07:33 (3 years ago)
Author:
ymipsl
Message:

Tracking memory leak :
Tranformations and algorithms are now managed with shared_ptr.

YM

File:
1 edited

Legend:

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

    r2226 r2270  
    1010 
    1111namespace xios { 
    12 CGenericAlgorithmTransformation* CDomainAlgorithmReorder::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     12shared_ptr<CGenericAlgorithmTransformation> CDomainAlgorithmReorder::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
    1313                                                             CTransformation<CDomain>* transformation, 
    1414                                                             int elementPositionInGrid, 
     
    2828  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    2929 
    30   return (new CDomainAlgorithmReorder(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain)); 
     30  return make_shared<CDomainAlgorithmReorder>(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain); 
    3131} 
    3232CATCH 
Note: See TracChangeset for help on using the changeset viewer.