[omniORB] strange behavior of '_this()' method
Michael Kilburn
crusader.mike at gmail.com
Thu Apr 2 03:10:49 BST 2009
On Wed, Apr 1, 2009 at 6:46 AM, Duncan Grisby <duncan at grisby.org> wrote:
> > > PortableServer::Servant_var servant = _poa->reference_to_servant(obj);
> >
> > Sorry, but no :) PortableServer::Servant is a pointer to (not a copy of)
> > the incarnating servant in the active object map. You don't want the
> > _var class to clean that up ever (and btw it won't compile anyway
> > because PortableServer::Servant is a local corba pseudo class thingy).
>
> You're both wrong, just in different ways :-)
>
Duh, of course I meant ServantBase_var... :-) Forgot a bit details, since we
have it wrapped in a macro.
> PortableServer::Servant servant = _poa->reference_to_servant(obj);
> > servant->_remove_ref();
>
> That is a dangerous thing to do. By calling _remove_ref there, you are
> assuming that the POA is going to keep holding its reference to the
> servant.
>
:-) This is exactly what happens in our case... But I am well-aware about
it.
--
Sincerely yours,
Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090402/b5d79e6f/attachment.htm
More information about the omniORB-list
mailing list