[omniORB] Server leaks / Threads constantly increasing

Duncan Grisby dgrisby@uk.research.att.com
Tue, 08 Jun 1999 09:19:22 +0100


On Monday 7 June, Kelly Burkhart wrote:

> Thomas Bednarz writes:

>  > I have a problem with objects I create through a factory on my server. I
>  > currently use version 2.6.1 on NT. When I look in NT's performance monitor
>  > or Task Manager the number of threads constantly increases by one with every
>  > object my Factory creates. These threads get killed only when the client
>  > process terminates. When the client does not need the object anymore it
>  > calls 	
>  > CORBA::BOA::getBOA()->dispose(<theObject>). But this does not decrease the
>  > number of threads!
>
> You can use the lifecycle support for this.  Take a look at the
> lifecycle examples and the <omniorbdir>/doc/lifecycle.ps doc for a
> nice factory example.

The life cycle stuff isn't necessary for what you're trying to
do. Calling BOA::dispose() should be sufficient for the object to be
cleaned up.

There are two possible explanations for what you are seeing: first,
the reference count in the server for the object you are disposing
must reach zero before it is actually removed. You should check your
server-side reference counting. Second, if the threads you are seeing
are omniORB's communications threads, then you may have to wait until
they are collected by the idle connection scanner before they go away.

HTH,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --