]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
21948: EDF SMESH : Memory is not freed when deleting a mesh
authoreap <eap@opencascade.com>
Fri, 14 Dec 2012 10:30:06 +0000 (10:30 +0000)
committereap <eap@opencascade.com>
Fri, 14 Dec 2012 10:30:06 +0000 (10:30 +0000)
-  delete c;
-  delete buffer;
+  delete [] c;
+  delete [] buffer;

src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx

index 97584c9fa7e4f80e243261010d2f86b33a9c2581..f8afa49dca4c1b05d6d7cd1cc55f800af7f107a0 100644 (file)
@@ -49,8 +49,8 @@ std::string convertString(const std::string& S)
   }
 
   std::string RS(buffer); 
-  delete c;
-  delete buffer;
+  delete [] c;
+  delete [] buffer;
   return RS;
 }
 
@@ -70,8 +70,8 @@ std::string restoreString(const std::string& S)
   }
 
   std::string RS(buffer); 
-  delete c;
-  delete buffer;
+  delete [] c;
+  delete [] buffer;
   return RS;
 }