Ignore:
Timestamp:
12/09/21 12:28:20 (3 years ago)
Author:
ymipsl
Message:

Tracking memory leak : release memory statically alocated

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/transformation.hpp

    r2270 r2274  
    5353    public: 
    5454      virtual ~CTransformation(void) {} 
    55  
     55      static void unregisterAllTransformations(); 
    5656    protected: 
    5757      typedef CTransformation<T>* (*createTransformationCallBack)(const StdString&, xml::CXMLNode*); 
     
    6262      static bool registerTransformation(ETranformationType transType, tuple<createTransformationCallBack,getIdTransformationCallBack> callBackFunctions); 
    6363      static bool unregisterTransformation(ETranformationType transType); 
     64      
     65 
    6466 
    6567    protected: 
     
    113115  } 
    114116 
     117  template<typename T> 
     118  void CTransformation<T>::unregisterAllTransformations(void) 
     119  { 
     120    if (0 != callBacks_) 
     121    { 
     122      callBacks_->clear(); 
     123      delete callBacks_ ;   
     124    } 
     125  } 
     126 
    115127} // namespace xios 
    116128 
Note: See TracChangeset for help on using the changeset viewer.