[omniORB] skipping orb->destrory

Duncan Grisby duncan at grisby.org
Wed Oct 29 16:11:34 GMT 2003


On Thursday 30 October, Luke Deller wrote:

> Renzo Tomaselli wrote:
> > Hi all,
> >     does anybody know about any ill side-effect from skipping orb->destroy
> > at application termination time ?
> 
> In a previous email to this list:
> http://www.omniorb-support.com/pipermail/omniorb-list/2001-October/019406.html
> 
> Duncan writes:
> 
>    "It is not necessary to call orb->destroy() -- your OS will clean up 
> for you."

That's still true.

[...]
> Hmm, I would have thought that no network activity would be performed by 
> orb->destroy.  It shouldn't do much more than deallocate memory from the 
> heap.  Perhaps this involves touching a lot of memory and causing a bit 
> of swapping from disk, which might account for the short delay you notice.

It can in fact involve some network traffic, since it has to send
CloseConnection messages on any open connections. It doesn't harm the
things on the other ends of the connections if the messages aren't
sent, though, since they have to cope with misbehaving programs
anyway.

The main reason for doing orb->destroy() is that it ensures any
outstanding calls have finished before the process exits. If you are
sure anyway, or you don't care, it's fine not to call it.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list