Ignore:
Timestamp:
12/07/21 12:07:33 (2 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/scalar_algorithm/scalar_algorithm_reduce_axis.cpp

    r1999 r2270  
    1818 
    1919namespace xios { 
    20 CGenericAlgorithmTransformation* CScalarAlgorithmReduceAxis::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     20shared_ptr<CGenericAlgorithmTransformation> CScalarAlgorithmReduceAxis::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
    2121                                                                     CTransformation<CScalar>* transformation, 
    2222                                                                     int elementPositionInGrid, 
     
    3636  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3737 
    38   return (new CScalarAlgorithmReduceAxis(isSource, scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
     38  return make_shared<CScalarAlgorithmReduceAxis>(isSource, scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis); 
    3939} 
    4040CATCH 
Note: See TracChangeset for help on using the changeset viewer.