Re: Object Reference counting idea.



Miguel de Icaza <miguel helixcode com> writes:

> One other thing: I agree with your argument about why it would not
> work to have this hack given the semantics that we have (and that COM
> has) with our current setup, I just wanted to comment on the `COM
> keeps track of the reference counts for you' issue.
> 

OK. I was doubtful because I talked to our friendly local ex-Microsoft
person, and he wasn't sure COM did anything like that. I'll check out
the references.

We did discuss how it might be easier for COM to do this than a
CORBA-based approach - COM can generate it's own arbitrarily
customized stubs and skeletons that can take care of passing the
reference. You can't really do that with CORBA because as soon as you
make the stubs and skeletons do magic stuff like this, you lose
compatibility with all other CORBA implementations.

There was one situation were were still unsure about.

Suppose you have a server [S] and two clients, [A] and [B]. [A] holds
a reference for <s>, an object implemented in the [S] server. Now [B]
calls a method of [A] which wants to return <s>. Per the refcounting
rules, [A] has to ref <s> before returning it. [B] now owns the new
ref. However, how does [S] know that? We couldn't figure out a way
that doesn't require extra round-trips to [S] from [A] or [B] or
both. If [S] is on a remote system, and [A] and [B] are in different
processes on the same system, this would be a serious performance
problem.

 - Maciej








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