From b477c93657e8f89c233a4c54bef8950bf3244b15 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 10 Jan 2006 10:34:39 +0000 Subject: [PATCH] Small correction of memory usage. --- src/VISU_I/VISU_Gen_i.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 - "<