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_duplicate_scalar.cpp

    r2147 r2270  
    1212 
    1313namespace xios { 
    14 CGenericAlgorithmTransformation* CAxisAlgorithmDuplicateScalar::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     14shared_ptr<CGenericAlgorithmTransformation> CAxisAlgorithmDuplicateScalar::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
    1515                                                                     CTransformation<CAxis>* transformation, 
    1616                                                                     int elementPositionInGrid, 
     
    3030  int scalarSrcIndex = elementPositionInGridSrc2ScalarPosition[elementPositionInGrid]; 
    3131 
    32   return (new CAxisAlgorithmDuplicateScalar(isSource, axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar)); 
     32  return make_shared<CAxisAlgorithmDuplicateScalar>(isSource, axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar); 
    3333} 
    3434CATCH 
Note: See TracChangeset for help on using the changeset viewer.