[omniORB] Destructor and Factories

Gary D. Duzan gdd0@gte.com
Thu, 10 Dec 1998 09:14:44 -0500


In Message <4.1.19981210124019.00a221c0@email> ,
   Martin Renner <Martin.Renner@pp-ulm.de> wrote:

=>In my opinion, the object on the server-side should be deleted after the
=>last client-proxy is deleted (that is, when the client called
=>CORBA::release()). The client-proxy should decrement the reference count on
=>the server side to 0. Otherwise, there's no way for the server to detect,
=>when a reference, that was passed to a client, is not any longer used.

   It is not possible to do this in general given the nature of CORBA
object references. (Try a dejanews search on Pacific Ocean Problem for
more information.) The client's reference count only affects the memory
taken up by the reference itself; it doesn't affect the server at all.
To destroy the server object you have to use the _boa()->dispose(obj)
call, which will destroy the object when its server-local reference
count hits zero. Clients may still have references afterwards, but they
will not be valid.

					Gary Duzan
					GTE Laboratories