[omniORB] Memory leak?

Duncan Grisby duncan at grisby.org
Thu Mar 26 16:56:09 GMT 2009


On Wednesday 25 March, Alfonso Acosta Gomez wrote:

> Valgrind suggests there's a memory leak in omniORB's initialise_poa()
> function. Is this right? I'm running omniORB 4.1.0
> 
> The code of MISCcorba::getRootPOA() (MISCcorba.C:496) is simply:
> 
>     try {
>       CORBA::Object_ptr obj =
> m_orb->resolve_initial_references("RootPOA");
>       m_poa = PortableServer::POA::_narrow(obj);
>       CORBA::release(obj);
>     }
>     // catching blocks skipped
>     return m_poa

That code fragment looks correct, but it's returning the POA
reference. What does the caller do with it?

Do you call destroy() on the Root POA?  If not, it's definitely going to
leak.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list