Re: refcount checking in add_interface




Maciej Stachowiak <mjs@eazel.com> writes:

> Nat Friedman <nat@helixcode.com> writes:
> 
> > Please add this check back.
> > 
> > Or, if you want to go a step further, you can enforce the actual
> > invariant which matters; that is, after someone QI's for an interface,
> > we must always give the same answer in the future.  The invariant is:
> > 
> >     If QI (component, "interface") returns a valid interface, it must
> >     always return a valid interface.  If QI (component, "interface")
> >     returns NIL, it must always return NIL.
> 
> The only way this invariant differs from "you may not add or remove an
> interface after exposing an object" is that it allows the component to
> add or remove an interface that has not been QI'd for yet. Is that a
> useful difference? I can't imagine why an object would want to do this
> rather than assembling all its interfaces ahead of time.

I don't know, but apparently it makes a difference because that check
keeps getting removed.

> What I'd like to do is give the aggregate object some specific bit
> indicating whether any of its interfaces have been exposed through
> CORBA, although I am not sure what a correct way to detect this is
> (it's possible and perhaps even likely you'll get at least one
> interface without ever doing a QI for it). If either of the objects
> you are trying to merge, the operation will just fail.

Dunno how to implement this.  Dubious that it can be done this way.

Nat



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]