Changeset 16502
- Timestamp:
- 10/22/13 08:42:26 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/IoModel.cpp
r16501 r16502 92 92 IoModel::~IoModel(){ 93 93 94 /*Some checks in debugging mode*/ 94 /*Delete independents*/ 95 if(this->independents){ 96 for(int i=0;i<MaximumNumberOfDefinitionsEnum;i++){ 97 if(this->independents[i]){ 98 IssmDouble* array=this->data[i]; 99 xDelete<IssmDouble>(array); 100 } 101 } 102 } 103 104 /*checks in debugging mode*/ 105 #ifdef _ISSM_DEBUG_ 95 106 if(this->data){ 96 107 for(int i=0;i<MaximumNumberOfDefinitionsEnum;i++){ 97 108 if(this->data[i]){ 98 /*Release data pertaining to Autodiff runs: */ 99 IssmDouble* array=this->data[i]; 100 xDelete<IssmDouble>(array); 101 } 102 } 103 } 109 printf0_("WARNING: previous pointer of " << EnumToStringx(i) << " has not been freed (DeleteData has not been called)\n"); 110 } 111 } 112 } 113 #endif 104 114 105 115 if(this->constants) delete this->constants; … … 820 830 821 831 _assert_(this->independents); 822 if 832 if(this->independents[data_enum]){ 823 833 /*this data has already been checked out! So cancel all that we've done here, and return 824 834 * the data[data_enum] directly: */ … … 827 837 else{ 828 838 *pmatrix=xNew<IssmDouble>(M*N); 829 for 839 for(int i=0;i<M*N;++i) (*pmatrix)[i]=matrix[i]; 830 840 } 831 841 xDelete<IssmPDouble>(matrix);
Note:
See TracChangeset
for help on using the changeset viewer.