source: issm/oecreview/Archive/11681-11700/ISSM-11691-11692.diff@ 11991

Last change on this file since 11991 was 11991, checked in by Eric.Larour, 13 years ago

oecreview from 11518 to present

File size: 1015 bytes
  • proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc.cpp

     
    6666        return memptr;
    6767}
    6868
    69 void xfree( void* *pv){
     69void xfree(void* *pv){
    7070
    71         if (pv && *pv) {
    72 
     71        if (pv && *pv){
    7372                #ifdef _SERIAL_
    74                 mxFree(*pv);
     73                        mxFree(*pv);
    7574                #else
    76                 free(*pv);
     75                        free(*pv);
    7776                #endif
    7877
    7978                *pv=NULL;
    8079        }
    8180}
    8281
    83 void xdelete( Matrix** pv){
    84 
    85         if (pv && *pv) {
    86 
     82void xdelete(Matrix** pv){
     83        if (pv && *pv){
    8784                delete *pv;
    8885                *pv=NULL;
    8986        }
    9087}
    9188
    92 void xdelete( Vector** pv){
    93 
    94         if (pv && *pv) {
    95 
    96                 delete *pv;
     89void xdelete(Vector** pv){
     90        if (pv && *pv){
     91                //delete *pv;
     92                VecFree(&(*pv)->vector);
    9793                *pv=NULL;
    9894        }
    9995}
    10096
    10197
    102 void* xrealloc ( void* pv, int size){
     98void* xrealloc( void* pv, int size){
    10399       
    104100        register void* value=NULL;
    105101       
Note: See TracBrowser for help on using the repository browser.