Re: Object Reference counting idea.



> To clean this up all this up, I think the best approach is to make
> BonoboObjectClient stop inheriting from BonoboObject. This particular
> piece of inheritance violates the Liskov Substitution principle anyway
> -- it's not the case that a bonobo object client IS-A or WORKS-LIKE-A
> bonobo object server. If anything, the inheritance should be the other
> way around, since you can always locally use a server like a client,
> but the converse is untrue.

Yes, we should do this.

> It refs the server on the remote side of the object, but not the local
> proxy stub thing. So actually, as I understand it, you should hardly
> ever use Bonobo_Unknown_ref, you should use bonobo_object_dup_ref (and
> bonobo_object_release_unref). Otherwise, there is no way to do correct
> memory management of the local parts of the CORBA_Object.

Oh, two new API calls someone else introduced.  Indeed, they do what
you just described.

> * bonobo_object_client_ref / bonobo_object_client_unref
> * bonobo_object_dup_ref / bonobo_object_release_unref

These seem like sugar someone added.

> Even if it's too late for GNOME 1.4, we need to work to make Bonobo
> easier to understand and use for developers in the long run.

I agree.  Where do we start chopping stuff?

Miguel.




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