Commit 0a269639 authored by BRAMAS Berenger's avatar BRAMAS Berenger

changed deleteall to deleteallarray

parent c5cf75a3
......@@ -136,10 +136,10 @@ public:
/** Default destructor */
virtual ~FAbstractSphericalKernel(){
if(preL2LTransitions.isLast()){
FMemUtils::DeleteAll(preL2LTransitions.getPtr(), treeHeight);
FMemUtils::DeleteAllArray(preL2LTransitions.getPtr(), treeHeight);
}
if(preM2MTransitions.isLast()){
FMemUtils::DeleteAll(preM2MTransitions.getPtr(), treeHeight);
FMemUtils::DeleteAllArray(preM2MTransitions.getPtr(), treeHeight);
}
}
......
......@@ -176,7 +176,7 @@ public:
}
}
}
FMemUtils::DeleteAll(preM2LTransitions.getPtr(), Parent::treeHeight);
FMemUtils::DeleteAllArray(preM2LTransitions.getPtr(), Parent::treeHeight);
}
}
......
......@@ -170,7 +170,7 @@ public:
}
}
}
FMemUtils::DeleteAll(preM2LTransitions.getPtr(), Parent::treeHeight);
FMemUtils::DeleteAllArray(preM2LTransitions.getPtr(), Parent::treeHeight);
}
}
......
......@@ -90,7 +90,7 @@ public:
/** Destructor */
~FSphericalKernel(){
if( preM2LTransitions.isLast() ){
FMemUtils::DeleteAll(preM2LTransitions.getPtr(), Parent::treeHeight);
FMemUtils::DeleteAllArray(preM2LTransitions.getPtr(), Parent::treeHeight);
}
}
......
......@@ -317,7 +317,7 @@ protected:
delete[] (ass_Legendre_func_Array);
delete[] (_precomputed_exp_I_chi_array);
delete[] (_precomputed_exp_I_omega_array);
FMemUtils::DeleteAll( rcc_tmp_transposed, devP);
FMemUtils::DeleteAllArray( rcc_tmp_transposed, devP);
delete[] rcc_tmp_transposed;
}
......@@ -335,8 +335,8 @@ protected:
}
~RotationM2LTransfer(){
FMemUtils::DeleteAll( rcc_outer, devP);
FMemUtils::DeleteAll( rcc_inner, devP);
FMemUtils::DeleteAllArray( rcc_outer, devP);
FMemUtils::DeleteAllArray( rcc_inner, devP);
delete[] rcc_outer;
delete[] rcc_inner;
delete[] outer_array;
......
......@@ -102,11 +102,19 @@ namespace FMemUtils {
/** Delete all */
template <class TypeClass>
inline void DeleteAll(TypeClass*const array[], const int size){
inline void DeleteAllArray(TypeClass*const array[], const int size){
for(int idx = 0 ; idx < size ; ++idx){
delete[] array[idx];
}
}
/** Delete all */
template <class TypeClass>
inline void DeleteAll(TypeClass*const array[], const int size){
for(int idx = 0 ; idx < size ; ++idx){
delete array[idx];
}
}
}
#endif // FMEMUTILS_HPP
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment