Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index 5724095a89cc6d565c0e9a3823c29d723704b488..75c9d2184ece2e5cde5aec19f65771cdbe4fd314 100644 (file)
@@ -439,7 +439,19 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
     {
       // load plugin library
       if(MYDEBUG) MESSAGE("Loading server meshers plugin library ...");
-      LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
+#ifdef WIN32
+  #ifdef UNICODE
+         const wchar_t* path = Kernel_Utils::decode_s(aPlatformLibName);
+  #else
+         const char* path = aPlatformLibName.c_str();
+  #endif
+#else
+         const char* path = aPlatformLibName.c_str();
+#endif
+      LibHandle libHandle = LoadLib( path );
+#if defined(WIN32) && defined(UNICODE)
+         delete path;
+#endif
       if (!libHandle)
       {
         // report any error, if occurred
@@ -4965,12 +4977,14 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
   if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Close" );
 
   // Clear study contexts data
-  delete myStudyContext;
-  myStudyContext = 0;
+  myStudyContext->Clear();
 
   // remove the tmp files meshes are loaded from
   SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD( theComponent );
 
+  // Clean trace of API methods calls
+  CleanPythonTrace();
+
   return;
 }