Changeset 25721


Ignore:
Timestamp:
10/29/20 13:57:15 (4 years ago)
Author:
Mathieu Morlighem
Message:

BUG: cleaning up memory leaks

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r25720 r25721  
    25932593                flux += rho_ice*Jdet*gauss->weight*thickness*(vx*normal[0] + vy*normal[1]);
    25942594        }
     2595
     2596        /*Cleanup and return*/
     2597        xDelete<IssmDouble>(xyz_list);
     2598        xDelete<IssmDouble>(xyz_front);
    25952599        delete gauss;
    25962600        return flux;
     
    27202724                flux += rho_ice*Jdet*gauss->weight*thickness*(vx*normal[0] + vy*normal[1]);
    27212725        }
     2726
     2727        /*Cleanup and return*/
    27222728        delete gauss;
     2729        xDelete<IssmDouble>(xyz_list);
    27232730        return flux;
    27242731}
     
    28462853        }
    28472854
     2855        /*Cleanup and return*/
     2856        delete gauss;
     2857        xDelete<IssmDouble>(xyz_list);
    28482858        return flux;
    28492859}
     
    43214331        /*Clean up and return*/
    43224332        delete gauss;
     4333        xDelete<IssmDouble>(xyz_list);
    43234334        return flux;
    43244335}
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r25627 r25721  
    149149        xDelete<char>(petscfilename);
    150150        xDelete<char>(restartfilename);
     151        xDelete<char>(modelname);
    151152        xDelete<char>(rootpath);
    152153
  • issm/trunk-jpl/src/c/cores/ProcessArguments.cpp

    r25627 r25721  
    1818        *solution_type = StringToEnumx(argv[1]);
    1919        char* rootpatharg = argv[2];
    20         char* modelname      = xNew<char>(strlen(argv[3])+1);
     20        char* modelname   = xNew<char>(strlen(argv[3])+1);
    2121        xMemCpy<char>(modelname,argv[3],strlen(argv[3])+1);
    2222
Note: See TracChangeset for help on using the changeset viewer.