mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
Correct some memory leaks
This commit is contained in:
parent
f7fbf1c622
commit
ef932e4d05
@ -196,6 +196,7 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
|||||||
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
||||||
while(itNodes->more())
|
while(itNodes->more())
|
||||||
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
||||||
|
delete itNodes;
|
||||||
|
|
||||||
fprintf(myFileId, "\n");
|
fprintf(myFileId, "\n");
|
||||||
}
|
}
|
||||||
@ -218,6 +219,7 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
|||||||
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
||||||
while(itNodes->more())
|
while(itNodes->more())
|
||||||
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
||||||
|
delete itNodes;
|
||||||
|
|
||||||
fprintf(myFileId, "\n");
|
fprintf(myFileId, "\n");
|
||||||
}
|
}
|
||||||
|
@ -573,12 +573,12 @@ void DriverMED_W_SMESHDS_Mesh::Add()
|
|||||||
/* allocation memoire */
|
/* allocation memoire */
|
||||||
connectivite =
|
connectivite =
|
||||||
(med_int *) malloc(sizeof(med_int) * taille * nmailles[i]);
|
(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]);
|
numele = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
|
||||||
nufael = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
|
nufael = (med_int *) malloc(sizeof(med_int) * nmailles[i]);
|
||||||
nomele = "";
|
|
||||||
nbNodes = typmai[i] % 100;
|
nbNodes = typmai[i] % 100;
|
||||||
|
|
||||||
for (j = 0; j < nmailles[i]; j++)
|
for (j = 0; j < nmailles[i]; j++)
|
||||||
@ -637,7 +637,6 @@ void DriverMED_W_SMESHDS_Mesh::Add()
|
|||||||
/* liberation memoire */
|
/* liberation memoire */
|
||||||
free(connectivite);
|
free(connectivite);
|
||||||
free(numele);
|
free(numele);
|
||||||
free(nomele);
|
|
||||||
free(nufael);
|
free(nufael);
|
||||||
MESSAGE(" End " << typmai[i]);
|
MESSAGE(" End " << typmai[i]);
|
||||||
}
|
}
|
||||||
|
@ -439,6 +439,7 @@ bool SMESH_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
int ij1 = j1 * nbdown + i1;
|
int ij1 = j1 * nbdown + i1;
|
||||||
quad->uv_grid[ij1].node = node;
|
quad->uv_grid[ij1].node = node;
|
||||||
}
|
}
|
||||||
|
delete itf;
|
||||||
|
|
||||||
for (int i1 = 0; i1 < nbdown; i1++)
|
for (int i1 = 0; i1 < nbdown; i1++)
|
||||||
for (int j1 = 0; j1 < nbright; j1++)
|
for (int j1 = 0; j1 < nbright; j1++)
|
||||||
|
Loading…
Reference in New Issue
Block a user