Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct some memory leaks
[modules/smesh.git]
/
src
/
DriverMED
/
DriverMED_W_SMESHDS_Mesh.cxx
diff --git
a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
index 14512530488dc0231408c3c4cd52286d304579d5..1c602e378d794a7f33ffb819c064244c2ad4506b 100644
(file)
--- a/
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
+++ b/
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
@@
-530,14
+530,11
@@
void DriverMED_W_SMESHDS_Mesh::Add()
//MESSAGE ("********* Traitement de la Famille "<<-t);
SMESHDS_SubMesh * SM = mySMESHDSMesh->MeshElements(S);
//MESSAGE ("********* Traitement de la Famille "<<-t);
SMESHDS_SubMesh * SM = mySMESHDSMesh->MeshElements(S);
- const vector<int>& indElt = SM->GetIDElements();
- vector<int>::const_iterator ite=indElt.begin();
-
+ SMDS_Iterator<const SMDS_MeshElement*> * ite=SM->GetElements();
bool plein = false;
bool plein = false;
-
for (; ite!=indElt.end(); ite++
)
+
while(ite->more()
)
{
{
- int eltId = *ite;
- mapFamille[eltId] = -t;
+ mapFamille[ite->next()->GetID()] = -t;
plein = true;
}
if (plein)
plein = true;
}
if (plein)
@@
-576,12
+573,12
@@
void DriverMED_W_SMESHDS_Mesh::Add()
/* allocation memoire */
connectivite =
(med_int *) malloc(sizeof(med_int) * taille * nmailles[i]);
/* allocation memoire */
connectivite =
(med_int *) malloc(sizeof(med_int) * taille * nmailles[i]);
- nomele =
+
/*
nomele =
(char *)malloc(sizeof(char) * MED_TAILLE_PNOM *
(char *)malloc(sizeof(char) * MED_TAILLE_PNOM *
- nmailles[i] + 1);
+ nmailles[i] + 1);*/
+ nomele = "";
numele = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
nufael = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
numele = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
nufael = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
- nomele = "";
nbNodes = typmai[i] % 100;
for (j = 0; j < nmailles[i]; j++)
nbNodes = typmai[i] % 100;
for (j = 0; j < nmailles[i]; j++)