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/grid_algorithm.hpp

    r2145 r2270  
    1919class CGarbageCollector ; 
    2020 
    21 class CGridAlgorithm 
     21class CGridAlgorithm : public std::enable_shared_from_this<CGridAlgorithm> 
    2222{ 
    2323  public: 
    24     CGridAlgorithm(CGenericAlgorithmTransformation* algorithm) : algorithm_(algorithm)  {} ; 
     24    CGridAlgorithm(shared_ptr<CGenericAlgorithmTransformation> algorithm) : algorithm_(algorithm)  {} ; 
    2525    virtual ~CGridAlgorithm() {} ; 
    2626    virtual void apply(const CArray<double,1>& dataIn, CArray<double,1>& dataOut) { abort(); } //=0 
     
    3131    
    3232    protected: 
    33       CGenericAlgorithmTransformation* algorithm_=nullptr ; 
     33      shared_ptr<CGenericAlgorithmTransformation> algorithm_=nullptr ; 
    3434}; 
    3535 
Note: See TracChangeset for help on using the changeset viewer.