Salome HOME
Fix Python dump of ExportPartToMED()
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index 5724095a89cc6d565c0e9a3823c29d723704b488..f994b82f0762ac67efd7c632710618cb0685a379 100644 (file)
@@ -4965,12 +4965,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;
 }