Salome HOME
22261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index f393b918c14440ff20c797f6275de355ede1bd92..411b111ee4c6616d82b11f8c1ee11b6e71e36445 100644 (file)
@@ -4675,8 +4675,10 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
 
               if ( SMESH_GroupOnFilter_i* aFilterGroup =
                    dynamic_cast< SMESH_GroupOnFilter_i*>( aGroupImpl ))
+              {
                 aFilterGroup->SetFilter( filter );
-
+                filter->UnRegister();
+              }
               SMESHDS_GroupBase* aGroupBaseDS = aGroupImpl->GetGroupDS();
               if ( !aGroupBaseDS )
                 continue;
@@ -4792,11 +4794,11 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
 
   // creation of tree nodes for all data objects in the study
   // to support tree representation customization and drag-n-drop:
-  SALOMEDS::UseCaseBuilder_var useCaseBuilder = theComponent->GetStudy()->GetUseCaseBuilder();
+  SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theComponent->GetStudy()->GetUseCaseBuilder();
   if ( !useCaseBuilder->IsUseCaseNode( theComponent ) ) {
     useCaseBuilder->SetRootCurrent();
     useCaseBuilder->Append( theComponent ); // component object is added as the top level item
-    SALOMEDS::ChildIterator_var it = theComponent->GetStudy()->NewChildIterator( theComponent ); 
+    SALOMEDS::ChildIterator_wrap it = theComponent->GetStudy()->NewChildIterator( theComponent ); 
     for (it->InitEx(true); it->More(); it->Next()) {
       useCaseBuilder->AppendTo( it->Value()->GetFather(), it->Value() );
     }
@@ -5015,8 +5017,8 @@ char* SMESH_Gen_i::getVersion()
 //            Is used in the drag-n-drop functionality.
 //=================================================================================
 void SMESH_Gen_i::Move( const SMESH::sobject_list& what,
-                       SALOMEDS::SObject_ptr where,
-                       CORBA::Long row )
+                        SALOMEDS::SObject_ptr where,
+                        CORBA::Long row )
 {
   if ( CORBA::is_nil( where ) ) return;