Changeset 11693


Ignore:
Timestamp:
03/13/12 19:26:32 (13 years ago)
Author:
Eric.Larour
Message:

Do not delete Matrix and Object. Matlab API bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp

    r11692 r11693  
    8181
    8282void xdelete(Matrix** pv){
     83       
    8384        if (pv && *pv){
     85                #ifdef _HAVE_PARALLEL_
     86                /*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we
     87                 * don't actually free memory in Matlab, we let the memory manager do that. We only
     88                 * free in parallel: */
    8489                delete *pv;
     90                #endif
    8591                *pv=NULL;
    8692        }
     
    8894
    8995void xdelete(Vector** pv){
     96
    9097        if (pv && *pv){
    91                 //delete *pv;
    92                 VecFree(&(*pv)->vector);
     98                #ifdef _HAVE_PARALLEL_
     99                /*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we
     100                 * don't actually free memory in Matlab, we let the memory manager do that. We only
     101                 * free in parallel: */
     102                delete *pv;
     103                #endif
    93104                *pv=NULL;
    94105        }
Note: See TracChangeset for help on using the changeset viewer.