[omniORB] activate_object

Duncan Grisby duncan@grisby.org
Fri, 10 May 2002 11:02:25 +0100


On Wednesday 8 May, yashik@veon.com wrote:

> The strange thing is that I'm not mixing debug&release versions of the
> libraries.
> I'm using debug libraries of omniORB (omniORB304_rtD.lib
> omnithread2_rtD.lib msvcstubD.lib) in my debug version.
> Win2000, MSVC 6,
> Debug Multithreaded settings. Defines:   _DEBUG,WIN32,_CONSOLE,_MBCS,
> __x86__,__NT__,__OSVERSION__=4,__WIN32__
> What I'm doing wrong?

If you dig into the debug settings in VC++, you'll find some options
about memory debugging. You have to set them correctly to match the
omniORB debug libraries. I can't remember the exact settings right
now, I'm afraid, and I don't have an easy way to check.

> Also, if returned value of activate_object should be put in _var variable,
> does it mean that in order to avoid memory leaks one always should receive
> it? Although I'm a newbie, I've seen not once lines like
>   poa->activate_object(some_servant);
> Is it a leak?

Yes, that's a leak since it allocates the object id sequence and you
never deallocate it.

Cheers,

Duncan.

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