Salome HOME
Correct some memory leaks
[modules/smesh.git] / src / DriverDAT / DriverDAT_W_SMESHDS_Mesh.cxx
index adcbd21..0c988c3 100644 (file)
@@ -196,6 +196,7 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
                SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
                while(itNodes->more())
                        fprintf(myFileId, "%d ", itNodes->next()->GetID());
+               delete itNodes;
        
                fprintf(myFileId, "\n");
        }
@@ -218,7 +219,8 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
                SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
                while(itNodes->more())
                        fprintf(myFileId, "%d ", itNodes->next()->GetID());
-               
+               delete itNodes; 
+
                fprintf(myFileId, "\n");
        }
        delete itVolumes;