[omniORB] Object life time

Duncan Grisby duncan at grisby.org
Mon Aug 18 12:33:15 BST 2003


On Thursday 14 August, Jerome.Kerdreux at finix.eu.org wrote:

[...]
> Is this a common way to do this or i'm going in the wrong way ? 
> Should i "cache" the previous objectref too ? (._this() ) and if so
> how could i find the Device_i instance corresponding for a given
> object ref  ? 

It's a reasonable thing to do, except that you haven't deactivated the
objects. Removing the servants from the list you are holding doesn't
deactivate them, so the objects are still alive. You must explicitly
deactivate them using deactivate_object().

There are all sorts of other schemes you could use to manage object
lifecycles. I'd strongly recommend getting "Advanced CORBA Programming
with C++" by Henning and Vinoski. Despite the examples being in C++,
it has a lot of good content relevant to Python.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list