Re: New Listener and EventSource interfaces
- From: Michael Meeks <michael helixcode com>
- To: Torsten Schulz <Torsten Schulz germany sun com>
- Cc: Alex Graveley <alex helixcode com>, gnome-components-list gnome org
- Subject: Re: New Listener and EventSource interfaces
- Date: Tue, 14 Nov 2000 08:26:39 -0500 (EST)
Hi Torsten,
On Mon, 13 Nov 2000, Torsten Schulz wrote:
> It just comes in my mind, that the event/listener interface was the
> first and most annoying source of cyclic references in StarOffice API.
> In common the client holds a reference to the server component and if
> the client registers a listener, the server component refs the client
> to.
>
> +----------------+ addRef() after activation +----------------+
> | client | ------------------------------> | server |
> | & listener | <------------------------------ | & event source |
> +----------------+ addRef() after addListener() +----------------+
>
>
> If the picture is right for Bonobo server, have you thought about the
> problem how the cyclic reference will be broken?
Well; we certainly thought about the problem. Currently we have a
thin layer of insulation from reference counting issues such as this,
since we have 2 levels of ref-counting: CORBA and Bonobo, the very
real problems of ref counting, how to deal with loops elegantly etc. I am
hoping can be put off until Bonobo 2.0.
In this case, the event source owns the Bonobo refs on its
listeners and manages their lifcycles. If a listener needs to detach
itself on destruction this can be done by keeping a CORBA ref on the
event source and freeing it on destruction.
So, now you share my pain :-) it's not nice, but it's the best we
can do with the current setup I think (?).
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]