]> SALOME platform Git repositories - modules/kernel.git/blobdiff - src/TOOLSDS/SALOMEDS_Tool.cxx
Salome HOME
SWP13333 : Copy/Paste med-objects in Post-Pro is incorrect
[modules/kernel.git] / src / TOOLSDS / SALOMEDS_Tool.cxx
index b47af559f706f54f6f9b0f7f671a52f6c19f80d2..e67c96a5e8393910a4703046de82a377bdf318a3 100644 (file)
@@ -141,11 +141,11 @@ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory,
   if(IsDirDeleted) {
     OSD_Path aPath(aDirName);
     OSD_Directory aDir(aPath);
-    OSD_FileIterator anIterator(aPath, '*');
+    OSD_FileIterator* anIterator = new OSD_FileIterator(aPath, '*');
 
-    if(aDir.Exists() && !anIterator.More())
+    if(aDir.Exists() && !anIterator->More())
                {
-                       anIterator.Destroy();
+      delete anIterator;
                        aDir.Remove();
                }
   }