[omniORB] Releasing ties.
PJ McKenna
pj.mckenna@datalex.ie
Wed, 9 Jun 1999 18:22:03 +0100
> Hi,
>
> An object will only be deleted if you have called the
> _dispose() method.
> As you say, this is defined in _sk_Session -- but
> _tie_Session is derived
> from this, and so inherits that member.
>
> Note also that the object will not be deleted until there are no more
> local references.
>
> For example:
>
> 1 Session_i* myimpl = new Session_i();
> 2 _tie_Session<Session_i,1>* myobj = new
> _tie_Session<Session_i,1>(myimpl);
> 3 myobj->_obj_is_ready(boa);
> 4 Session_ptr myobjref = myobj->_this();
> 5 myobj->_dispose();
> 6 CORBA::release(myobjref);
>
> <myimpl> is not deleted until line 6. If either line 5 or
> line 6 had been
> omitted, then <myimpl> would never have been deleted.
>
> Hope that helps,
> David
David,
Thanks for the info. I was used to Orbix and "_dispose" was news to me.
Yeah, RTFM.
Is there a way to get a pointer to a _sk_Session-derived object from an
object reference?
Yours with red face,
P.J.