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/scalar_algorithm/scalar_algorithm_reduce_scalar.cpp

    r2011 r2270  
    1313 
    1414namespace xios { 
    15 CGenericAlgorithmTransformation* CScalarAlgorithmReduceScalar::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     15shared_ptr<CGenericAlgorithmTransformation> CScalarAlgorithmReduceScalar::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
    1616                                                                     CTransformation<CScalar>* transformation, 
    1717                                                                     int elementPositionInGrid, 
     
    3131  int scalarSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3232 
    33   return (new CScalarAlgorithmReduceScalar(isSource, scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar)); 
     33  return make_shared<CScalarAlgorithmReduceScalar>(isSource, scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar); 
    3434} 
    3535CATCH 
Note: See TracChangeset for help on using the changeset viewer.