/[escript]/branches/doubleplusgood/dudley/src/Mesh.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/Mesh.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4261 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4332 by jfenwick, Thu Mar 21 04:21:14 2013 UTC
# Line 31  Dudley_Mesh *Dudley_Mesh_alloc(char *nam Line 31  Dudley_Mesh *Dudley_Mesh_alloc(char *nam
31    
32      /*  allocate the return value */      /*  allocate the return value */
33    
34      out = MEMALLOC(1, Dudley_Mesh);      out = new Dudley_Mesh;
35      if (Dudley_checkPtr(out))      if (Dudley_checkPtr(out))
36      return NULL;      return NULL;
37      out->Name = NULL;      out->Name = NULL;
# Line 54  Dudley_Mesh *Dudley_Mesh_alloc(char *nam Line 54  Dudley_Mesh *Dudley_Mesh_alloc(char *nam
54      }      }
55      /*   copy name: */      /*   copy name: */
56    
57      out->Name = MEMALLOC(strlen(name) + 1, char);      out->Name = new  char[strlen(name) + 1];
58      if (Dudley_checkPtr(out->Name))      if (Dudley_checkPtr(out->Name))
59      {      {
60      Dudley_Mesh_free(out);      Dudley_Mesh_free(out);
# Line 99  void Dudley_Mesh_free(Dudley_Mesh * in) Line 99  void Dudley_Mesh_free(Dudley_Mesh * in)
99      in->reference_counter--;      in->reference_counter--;
100      if (in->reference_counter < 1)      if (in->reference_counter < 1)
101      {      {
102          MEMFREE(in->Name);          delete[] in->Name;
103          Dudley_NodeFile_free(in->Nodes);          Dudley_NodeFile_free(in->Nodes);
104          Dudley_ElementFile_free(in->FaceElements);          Dudley_ElementFile_free(in->FaceElements);
105          Dudley_ElementFile_free(in->Elements);          Dudley_ElementFile_free(in->Elements);
# Line 110  void Dudley_Mesh_free(Dudley_Mesh * in) Line 110  void Dudley_Mesh_free(Dudley_Mesh * in)
110          Paso_SystemMatrixPattern_free(in->ReducedFullPattern);          Paso_SystemMatrixPattern_free(in->ReducedFullPattern);
111          Paso_SystemMatrixPattern_free(in->ReducedReducedPattern);          Paso_SystemMatrixPattern_free(in->ReducedReducedPattern);
112          Esys_MPIInfo_free(in->MPIInfo);          Esys_MPIInfo_free(in->MPIInfo);
113          MEMFREE(in);          delete in;
114      }      }
115      }      }
116  }  }

Legend:
Removed from v.4261  
changed lines
  Added in v.4332

  ViewVC Help
Powered by ViewVC 1.1.26