]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Get fix of the bug from the V5_1_5_BR
authorrnv <rnv@opencascade.com>
Fri, 22 Oct 2010 12:17:06 +0000 (12:17 +0000)
committerrnv <rnv@opencascade.com>
Fri, 22 Oct 2010 12:17:06 +0000 (12:17 +0000)
src/SALOMEDS/SALOMEDS_Study_i.cxx

index 56be377dc6eb1b34aa3206f24d9851c70afee14b..94e3537e0eb5fbba75255074a8b6dd0e77bbfb38 100644 (file)
@@ -678,7 +678,7 @@ SALOMEDS::UseCaseBuilder_ptr SALOMEDS_Study_i::GetUseCaseBuilder()
 void SALOMEDS_Study_i::Close()
 {
   SALOMEDS::Locker lock; 
-
+  
   RemovePostponed(-1);
 
   SALOMEDS::SComponentIterator_var itcomponent = NewComponentIterator();
@@ -756,7 +756,10 @@ void SALOMEDS_Study_i::RemovePostponed(CORBA::Long /*theUndoLimit*/)
     try {
       CORBA::Object_var obj = _orb->string_to_object(anIORs[i].c_str());
       SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj);
-      if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy();
+         //rnv: To avoid double deletion of the Salome Generic Objects:
+         //rnv: 1. First decrement of the reference count in the SALOMEDSImpl_AttributeIOR::~SALOMEDSImpl_AttributeIOR();
+         //rnv: 2. Second decrement of the reference count in the next string : aGeneric->Destroy();
+      //if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy();
     } catch (...) {}
   }