]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix a bug (memory problem) : replace auto_ptr by std::string
authorvsr <vsr@opencascade.com>
Wed, 23 Aug 2006 09:41:13 +0000 (09:41 +0000)
committervsr <vsr@opencascade.com>
Wed, 23 Aug 2006 09:41:13 +0000 (09:41 +0000)
src/VISU_I/VISU_Result_i.cc

index 7fdddb84c43aa66ee55d3ccc3688f3526d98a84b..ef5ee4fb77cef468c4cbc57d26e80bc4b1b4cbab 100644 (file)
@@ -439,15 +439,15 @@ Create(const char* theFileName)
     myInitFileName = myFileInfo.filePath().latin1();
     myName = ::GenerateName(myFileInfo.fileName()).latin1();
     if(GetSourceId() == eRestoredFile){
-      auto_ptr<char> aTmpDir((char*)SALOMEDS_Tool::GetTmpDir().c_str());
+      std::string aTmpDir = SALOMEDS_Tool::GetTmpDir();
       static QString aCommand;
-      aCommand.sprintf("cp %s %s",myFileInfo.absFilePath().latin1(),aTmpDir.get());
+      aCommand.sprintf("cp %s %s",myFileInfo.absFilePath().latin1(),aTmpDir.c_str());
       if(system(aCommand) == -1){
        MESSAGE("Create - Can't execute the command :"<<aCommand);
        return NULL;
       }
       if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<aCommand);
-      myFileInfo.setFile(QString(aTmpDir.get()) + myFileInfo.fileName());
+      myFileInfo.setFile(QString(aTmpDir.c_str()) + myFileInfo.fileName());
     }
     myInput = CreateConvertor(myFileInfo.absFilePath().latin1());
     if(!myInput)