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

    r2270 r2274  
    6060  static bool unregisterTransformation(ETranformationType transType); 
    6161  static bool initializeTransformation_; 
     62  static void unregisterAllTransformations(void) ; 
    6263}; 
    6364 
     
    9899bool CGridTransformationFactory<T>::registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn) 
    99100{ 
    100   if (0 == transformationCreationCallBacks_) 
     101  if (nullptr == transformationCreationCallBacks_) 
    101102    transformationCreationCallBacks_ = new CallBackMap(); 
    102103 
     
    110111} 
    111112 
     113template<typename T> 
     114void CGridTransformationFactory<T>::unregisterAllTransformations(void) 
     115{ 
     116  if (nullptr != transformationCreationCallBacks_)  
     117  { 
     118    transformationCreationCallBacks_->clear() ; 
     119    delete transformationCreationCallBacks_; 
     120  } 
     121} 
    112122 
    113123} 
     124 
    114125#endif // __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__ 
Note: See TracChangeset for help on using the changeset viewer.