[omniORB] object deletion strategies

Stefan Seefeld seefelds@MAGELLAN.UMontreal.CA
Wed, 19 Apr 2000 09:00:45 -0400


I'm planning to design new interfaces around the scene graph
we use in berlin. The nodes are of type 'Graphic' and I'd like
to write an iterator for the child nodes:

interface GraphicIterator;

interface Graphic
{
  typedef GraphicIterator Iterator;
  //...
  Iterator firstChild();
  Iterator lastChild();
};

interface GraphicIterator
{
  Graphic child();
  void next();
  void prev();
};

Graphic would serve as a factory for concrete iterators etc.
My question is about how to delete/dispose graphics and iterators.
As I understand it, omniORB has the _dispose() call because
in case of colocation method invocations are simply virtual
method calls, i.e. there is no mechanism to test for the object's
existence. That's why objects can't simply be deleted. While remote
calls will result in the ORB to test whether the object is still
valid, local calls will not.
It seems the POA will change this, i.e. there is *always*
an implied test for the object's validity. This would mean that
I can delete the object directly without the need to care how many
local references to it still exist (even local references are proxies...)
Is this interpretion right ?

I'm asking this because it influences major design decisions. Also,
if the POA will indeed test on every call, I'm wondering whether
in the special context of berlin, where we have a real lot of fine
grained objects (down to Region, Transformation etc.) it wouldn't be
better to stick to a model similar to the one currently in use (BOA), 
i.e. not to intercept local method invocations at the cost of having 
to care about ref counting etc. 

Any advise is highly appreciated.


Regards,	Stefan
_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds@magellan.umontreal.ca

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...