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/axis_algorithm/axis_algorithm_extract_domain.cpp

    r2255 r2270  
    1515#include "reduction.hpp" 
    1616 
    17 namespace xios { 
    18 CGenericAlgorithmTransformation* CAxisAlgorithmExtractDomain::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     17namespace xios 
     18{ 
     19 
     20shared_ptr<CGenericAlgorithmTransformation> CAxisAlgorithmExtractDomain::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
    1921                                                                     CTransformation<CAxis>* transformation, 
    2022                                                                     int elementPositionInGrid, 
     
    3436  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    3537 
    36   return (new CAxisAlgorithmExtractDomain(isSource, axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
     38  return make_shared<CAxisAlgorithmExtractDomain>(isSource, axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain); 
    3739} 
    3840CATCH 
Note: See TracChangeset for help on using the changeset viewer.