From: jfa Date: Tue, 10 Jan 2006 10:34:39 +0000 (+0000) Subject: Small correction of memory usage. X-Git-Tag: T_Before_Join_BR-D5-38-2003~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b477c93657e8f89c233a4c54bef8950bf3244b15;p=modules%2Fvisu.git Small correction of memory usage. --- diff --git a/src/VISU_I/VISU_Gen_i.cc b/src/VISU_I/VISU_Gen_i.cc index 4801ceee..2a86c3a8 100644 --- a/src/VISU_I/VISU_Gen_i.cc +++ b/src/VISU_I/VISU_Gen_i.cc @@ -237,8 +237,8 @@ namespace VISU{ Mutex mt(myMutex); SALOMEDS::Study_var aStudy = theComponent->GetStudy(); SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - const char* aDir = isMultiFile? theURL: SALOMEDS_Tool::GetTmpDir().c_str(); - TCollection_AsciiString aTmpDir(const_cast(aDir)); + string aDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir(); + TCollection_AsciiString aTmpDir (const_cast(aDir.c_str())); VisuTmpDir = aTmpDir.ToCString(); SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.ToCString(),isMultiFile); @@ -274,8 +274,8 @@ namespace VISU{ bool isMultiFile) { Mutex mt(myMutex); - const char* aDir = isMultiFile? theURL: SALOMEDS_Tool::GetTmpDir().c_str(); - TCollection_AsciiString aTmpDir(const_cast(aDir)); + string aDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir(); + TCollection_AsciiString aTmpDir (const_cast(aDir.c_str())); if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<(aDir)); + string aDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir(); + TCollection_AsciiString aTmpDir (const_cast(aDir.c_str())); if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<