From: vsr Date: Wed, 23 Aug 2006 09:41:13 +0000 (+0000) Subject: Fix a bug (memory problem) : replace auto_ptr by std::string X-Git-Tag: V2_2_0_maintainance_FINAL~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cbb9523240d898f68da0c5da20a185d3b8ee3cdf;p=modules%2Fvisu.git Fix a bug (memory problem) : replace auto_ptr by std::string --- diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 7fdddb84..ef5ee4fb 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -439,15 +439,15 @@ Create(const char* theFileName) myInitFileName = myFileInfo.filePath().latin1(); myName = ::GenerateName(myFileInfo.fileName()).latin1(); if(GetSourceId() == eRestoredFile){ - auto_ptr 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 :"<