[omniORB] delete corba object

Yvan Peter Yvan.Peter@cnet.francetelecom.fr
Fri, 11 Sep 1998 14:01:13 +0200


Drago Nicola wrote:
> 
> I'm using omniORB 2.5.0.
> 
> I need to destroy an corba object after utilization but the system
> return runtime
> ../object.cc:742: failed assertion `0'
> Abort (core dumped)
> 
> The code id:
> 
> mediator_impl *myobj = new mediator_impl(_this());
> myobj->_obj_is_ready(boa);
> boa  -> impl_is_ready(0,1);
> 
> //.....  Code to utilize myobj
> 
> mediator_impl -> _dispose();
> delete myobj;
> 

  Perhaps this is part of the solution :

  _this() increments the object reference counter and _dispose() waits for the 
  counter to reach 0. You should release the reference created by _this() :

   intfName_ptr i = _this();
   mediator_impl *myobj = new mediator_impl(i);
   CORBA::release(i);


  Yvan

-- 
Yvan PETER   France Telecom/CNET
42, rue des Coutures - BP6243 F-14066 CAEN Cedex
phone (+33) 2.31.75.91.39 / fax (+33) 2.31.73.56.26
email: Yvan.Peter@cnet.francetelecom.fr