Re: Object Reference counting idea.
- From: Maciej Stachowiak <mjs eazel com>
- To: Michael Meeks <mmeeks gnu org>
- Cc: Miguel de Icaza <miguel helixcode com>, Elliot Lee <sopwith redhat com>, gnome-components-list gnome org
- Subject: Re: Object Reference counting idea.
- Date: 10 Oct 2000 14:44:25 -0700
Michael Meeks <michael helixcode com> writes:
> Hi all,
>
> Here is my proposal ( based on a discussion with George Lebl in
> Toronto about what happens in the panel ); which is simple, almost
> entirely foolproof, trivial to implement and yet gives us a fair whack of
> protection.
>
> We partition refs and unrefs into 2 sorts; local and
> remote.
>
> * Remote is defined as coming through impl_Bonobo_Unknown_ref.
> * Local is defined as coming immediately though bonobo_object_ref.
>
> NB. 'Remote' calls thus can happen in-process for shared
> libraries, or even by doing Bonobo_Unknown_ref/unref in the server
> process.
>
This sounds much more feasible to implement, but I have a few questions.
1) Is the initial ref local or remote?
2) Does `query_interface' grab a local or remote ref?
3) What about other methods that implicitly ref the return value?
4) What about calling bonobo_object_ref on a BonoboObjectClient?
The other issue is that this approach makes the two kinds of refcounts
explicit and visible to the user. The confusion among gtk_object_ref,
bonobo_object_ref, Bonobo_Unknown_ref and CORBA_Object_duplicate is
already pretty bad. Right now, at least, bonobo_object_ref and
Bonobo_Unknown_ref do the same thing. If they were different, there
would be four kinds of refcounting for Bonobo objects, one of which
you should never use (gtk_object_ref). Is four (or three if you want
to call it that) kinds of refcounts for one object a good, clear
design? COM has only one.
> Of course; if we try to do anything more for Gnome 2.0, I'd like
> to read up on distributed garbage collection, everyone keeps claiming this
> is an unsolved problem and clearly there would be a load of issues. If
> anyone has some nice links on the subject I'd much appreciate them.
I will try to look up some useful research papers for you.
- Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]