Changeset 12852


Ignore:
Timestamp:
08/01/12 15:24:50 (13 years ago)
Author:
Eric.Larour
Message:

BUG: reverting to previous memory managenet in xdelete_module. This is
a bug due to Matlab C++ memory management deficiencies (to say the least).

File:
1 edited

Legend:

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

    r12850 r12852  
    2222                /*Actually, still get rid of internal Petsc matrix. Quick fix until Matlab handles C++
    2323                 * correctly: */
    24                 /*Keeping this for legacy reasons: */
    25                 /*#ifdef _HAVE_PETSC_
    26                         MatFree(&(*pv)->matrix);
    27                 #endif*/
    28                 delete *pv;
     24                #ifdef _HAVE_PETSC_
     25                        MatFree(&(*pv)->pmatrix->matrix);
     26                #endif
    2927                *pv=NULL;
    3028        }
     
    3634                /*Actually, still get rid of internal Petsc vector. Quick fix until Matlab handles C++
    3735                 * correctly: */
    38                 /*Keeping this for legacy reasons: shoudl be done by the vector itself!*/
    39                 /*#ifdef _HAVE_PETSC_
    40                         VecFree(&(*pv)->vector);
    41                 #endif*/
    42                 delete *pv;
     36                #ifdef _HAVE_PETSC_
     37                        VecFree(&(*pv)->pvector->vector);
     38                #endif
    4339                *pv=NULL;
    4440        }
Note: See TracChangeset for help on using the changeset viewer.