{
// 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
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 );