Changeset 21876


Ignore:
Timestamp:
07/26/17 13:54:13 (8 years ago)
Author:
schlegel
Message:

CHG: cleaned up some memory leaks during copy

Location:
issm/trunk-jpl/src/c
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp

    r20637 r21876  
    4949                                FemModel* femmodel;
    5050                               
    51                                 char     **responses_descriptors    = NULL;      //these are our! there are only numresponsedescriptors of them, not d_numresponses!!!
     51                                char     **responses_descriptors    = NULL;      //these are ours! there are only numresponsedescriptors of them, not d_numresponses!!!
     52                                char      *response_descriptor      = NULL;
    5253                                int        numresponsedescriptors;
    5354                                int        solution_type;
     
    128129                                }
    129130                                xDelete<char*>(variable_descriptors);
     131                                for(i=0;i<numFns;i++){
     132                                        response_descriptor=responses_descriptors[i];
     133                                        xDelete<char>(response_descriptor);
     134                                }
     135                                if(responses_descriptors) xDelete<char*>(responses_descriptors);
    130136                                xDelete<IssmDouble>(responses);
    131137                                delete femmodel;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r21872 r21876  
    172172}
    173173/*}}}*/
    174 void     Penta::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){/*{{{*/
     174void       Penta::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){/*{{{*/
    175175
    176176        PentaRef::BasalNodeIndices(pnumindices,pindices,finiteelement);
     
    22132213void       Penta::ResetHooks(){/*{{{*/
    22142214
     2215        if(this->nodes) xDelete<Node*>(this->nodes);
    22152216        this->nodes=NULL;
    22162217        this->vertices=NULL;
  • issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp

    r21068 r21876  
    808808void     Tetra::ResetHooks(){/*{{{*/
    809809
     810        if(this->nodes) xDelete<Node*>(this->nodes);
    810811        this->nodes=NULL;
    811812        this->vertices=NULL;
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r21808 r21876  
    26802680void       Tria::ResetHooks(){/*{{{*/
    26812681
     2682        if(this->nodes) xDelete<Node*>(this->nodes);
    26822683        this->nodes=NULL;
    26832684        this->vertices=NULL;
  • issm/trunk-jpl/src/c/main/issm_dakota.cpp

    r19698 r21876  
    8484        env.execute();
    8585
     86        xDelete<char>(dakota_input_file);
     87        xDelete<char>(dakota_output_file);
     88        xDelete<char>(dakota_error_file);
     89
    8690        /*Return unix success: */
    8791        return 0;
     
    9094        return 1;
    9195        #endif
     96
    9297}
Note: See TracChangeset for help on using the changeset viewer.