Changeset 4207


Ignore:
Timestamp:
06/24/10 16:24:31 (15 years ago)
Author:
Mathieu Morlighem
Message:

memory leaks

Location:
issm/trunk/src/c/objects/Elements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/PentaHook.cpp

    r4178 r4207  
    2929/*FUNCTION PentaHook::~PentaHook(){{{1*/
    3030PentaHook::~PentaHook(){
    31         xfree((void**)&hnodes);
     31        delete [] this->hnodes;
    3232}
    3333/*}}}*/
     
    3535void PentaHook::InitHookNodes(int in_numanalyses){
    3636
    37         ISSMASSERT(in_numanalyses);
     37        this->numanalyses=in_numanalyses;
     38        this->hnodes=new Hook[in_numanalyses];
    3839
    39         this->numanalyses=in_numanalyses;
    40         this->hnodes=(Hook*)xmalloc(in_numanalyses*sizeof(Hook));
    41 
    42         for (int i=0;i<in_numanalyses;i++) this->hnodes[i].Init(NULL,0);
    4340}
    4441/*}}}*/
  • issm/trunk/src/c/objects/Elements/TriaHook.cpp

    r4178 r4207  
    2929/*FUNCTION TriaHook::~TriaHook(){{{1*/
    3030TriaHook::~TriaHook(){
    31         xfree((void**)&hnodes);
     31        delete [] this->hnodes;
    3232}
    3333/*}}}*/
     
    3535void TriaHook::InitHookNodes(int in_numanalyses){
    3636
    37         ISSMASSERT(in_numanalyses);
     37        this->numanalyses=in_numanalyses;
     38        this->hnodes=new Hook[in_numanalyses];
    3839
    39         this->numanalyses=in_numanalyses;
    40         this->hnodes=(Hook*)xmalloc(in_numanalyses*sizeof(Hook));
    41 
    42         for (int i=0;i<in_numanalyses;i++) this->hnodes[i].Init(NULL,0);
    4340}
    4441/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.