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

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src/filter
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/temporal_transform_filter.cpp

    r2195 r2270  
    55{ 
    66 
    7   CTemporalTransformFilter::CTemporalTransformFilter(CGarbageCollector& gc, int slots, CGridAlgorithm* algo, int nrecords, bool detectMissingValues, double defaultValue) 
     7  CTemporalTransformFilter::CTemporalTransformFilter(CGarbageCollector& gc, int slots, shared_ptr<CGridAlgorithm> algo, int nrecords, bool detectMissingValues, double defaultValue) 
    88  : CTransformFilter(gc, slots, algo, detectMissingValues, defaultValue), nrecords_(nrecords), graphCycleCompleted(true) 
    99  { 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/temporal_transform_filter.hpp

    r2195 r2270  
    1414    public: 
    1515 
    16       CTemporalTransformFilter(CGarbageCollector& gc, int slots, CGridAlgorithm* algo, int nrecords, bool detectMissingValues, double defaultValue) ; 
     16      CTemporalTransformFilter(CGarbageCollector& gc, int slots, shared_ptr<CGridAlgorithm> algo, int nrecords, bool detectMissingValues, double defaultValue) ; 
    1717 
    1818    protected: 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/transform_filter.cpp

    r2143 r2270  
    55{ 
    66   
    7   CTransformFilter::CTransformFilter( CGarbageCollector& gc, int slots, CGridAlgorithm* algo, bool detectMissingValues, double defaultValue)  
     7  CTransformFilter::CTransformFilter( CGarbageCollector& gc, int slots, shared_ptr<CGridAlgorithm> algo, bool detectMissingValues, double defaultValue)  
    88                                    : CFilter(gc, slots, this), algorithm_(algo),  
    99                                      detectMissingValues_(detectMissingValues), defaultValue_(defaultValue) 
     
    3535  } 
    3636 
    37   void CTransformFilter::buildWorkflowGraph(std::vector<CDataPacketPtr> data, CDataPacketPtr packet, CGridAlgorithm* algorithm) 
     37  void CTransformFilter::buildWorkflowGraph(std::vector<CDataPacketPtr> data, CDataPacketPtr packet, shared_ptr<CGridAlgorithm> algorithm) 
    3838  { 
    3939    if(this->graphEnabled) 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/transform_filter.hpp

    r2143 r2270  
    1515    public: 
    1616 
    17       CTransformFilter(CGarbageCollector& gc, int slots, CGridAlgorithm* algo, bool detectMissingValues, double defaultValue) ; 
     17      CTransformFilter(CGarbageCollector& gc, int slots, shared_ptr<CGridAlgorithm> algo, bool detectMissingValues, double defaultValue) ; 
    1818 
    1919    protected: 
     
    2222      */ 
    2323      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data) ; 
    24       void buildWorkflowGraph(std::vector<CDataPacketPtr> data, CDataPacketPtr packet, CGridAlgorithm* algorithm); 
     24      void buildWorkflowGraph(std::vector<CDataPacketPtr> data, CDataPacketPtr packet, shared_ptr<CGridAlgorithm> algorithm); 
    2525       
    2626//      void apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest); 
    2727      
    28       CGridAlgorithm* algorithm_ ; 
     28      shared_ptr<CGridAlgorithm> algorithm_ ; 
    2929      bool detectMissingValues_ ; 
    3030      bool defaultValue_ ; 
Note: See TracChangeset for help on using the changeset viewer.