Re: freeing an object whose clients have died unexpectantly



On Sat, 2001-12-29 at 21:53, Michael Meeks wrote:
> Hi Diego,
> 
> On Sat, 2001-12-29 at 16:51, Diego González wrote:
> > 	i have a server that has to free the objets that are allocated to
> > clients that die unexpectantly.
> 
> 	Ok - sounds reasonable.
> 
> > (To detect when the client died i pass an object from the client to the
> > server, and then i use the OBRit_small_listen_for_broken in that object)
> 
> 	Sounds reasonable.
> 
> > 	When the client dies the callback is called, and i should free the
> > object, to do this i have to do two bonobo_object_unrefs (because the
> > client that died couldn't do the bonobo_object_unref by itself), which
> > is ugly. Is there any other way to destroy an objet in this case?
> 
> 	Sounds strange. Of course - this situation is not altogether ideal; it
> depends what you want to do. It seems strange to me that the client
> holds a ref and someone else does to.
> 
> 	Are you sure that when the object is created you return:
> 
> 	CORBA_Object_duplicate (BONOBO_OBJREF (obj), ev)
> 
> 	rather than bonobo_object_dup_ref - ie. when you create an object it
> has a single reference, you don't want to duplicate that as you pass it
> off from a factory.

	this was the problem, i was doing a bonobo_object_dup_ref, thanks a
lot.

Diego


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]