Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Suppress memory leak when using Kernel_Utils::decode()
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_Gen.cxx
diff --git
a/src/SMESH/SMESH_Gen.cxx
b/src/SMESH/SMESH_Gen.cxx
index 4e24447b3aa70407dedeba452cd812ef5c9516cd..65e59d98dfdb38e53223261b42b0937910621293 100644
(file)
--- a/
src/SMESH/SMESH_Gen.cxx
+++ b/
src/SMESH/SMESH_Gen.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
0
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-202
1
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-1077,18
+1077,14
@@
std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
-
#
ifdef UNICODE
+
#
ifdef UNICODE
const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
- #else
+ SMESHUtils::ArrayDeleter<const wchar_t> deleter( path );
+# else
const char* path = xmlPath.c_str();
const char* path = xmlPath.c_str();
- #endif
-
+# endif
fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
- #ifdef UNICODE
- delete path;
- #endif
-
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif