[omniORB] Why does _this() increment ref count on servant for the first time it's called?

Clarke Brunt clarke.brunt at trafficmaster.co.uk
Tue Oct 31 16:56:59 GMT 2006


omniorb-list-bounces at omniorb-support.com wrote:
> We are debugging the reference counting on our servants and
> ran into a
> peculiar problem with _this() function.  Why does _this() increment
> the reference count on the servant for the first time the function is
> called, and then if we call _this() again on the same servant
> subsequently, it does not increment the reference count
> again?  Is this
> the correct behavior that we are seeing?
> 
> Our servants derive from RefCountServantBase because we want them to
> go away when no clients need them anymore.  We are very careful with
> object reference counts and make sure that they are correct for the
> number of clients.

Quick answer without me spending time to look up the details: it because
you are using 'implicit activation' and the first time you use _this(),
the servant is activated, and the counted reference to it is from the
POA. When you call it again, the servant has already been activated, so
no extra reference is needed.

-- 
Clarke Brunt, Principal Software Engineer, Trafficmaster


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.



More information about the omniORB-list mailing list