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/generic_algorithm_transformation.cpp

    r2011 r2270  
    3333/////////////////////////////////////////////////////////////// 
    3434 
    35 CGridAlgorithm* CGenericAlgorithmTransformation::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 
     35shared_ptr<CGridAlgorithm> CGenericAlgorithmTransformation::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 
    3636{ 
    37   return new CGridAlgorithmGeneric(gridSrc, gridDst, pos, this) ; 
     37  return make_shared<CGridAlgorithmGeneric>(gridSrc, gridDst, pos, shared_from_this()) ; 
    3838} 
    3939 
    4040 
    4141 
    42 CTransformFilter* CGenericAlgorithmTransformation::createTransformFilter(CGarbageCollector& gc, CGridAlgorithm* algo, bool detectMissingValues, double defaultValue) 
     42CTransformFilter* CGenericAlgorithmTransformation::createTransformFilter(CGarbageCollector& gc, shared_ptr<CGridAlgorithm> algo, bool detectMissingValues, double defaultValue) 
    4343{ 
    4444  return new CTransformFilter(gc, 1, algo, detectMissingValues, defaultValue) ; 
Note: See TracChangeset for help on using the changeset viewer.