Re: Circular reference problem



There shouldn't be a circular ref loop.

BonoboWidget holds a ref on the ControlFrame, which holds a ref on the
control, which holds a ref on its widget, and down the line.

The problem is basically that we need to make sure that the
ControlFrame unrefs the control before it goes away.

(I assume you are talking about Bonobo ref counts here, and not corba
object dups)

Nat

Maciej Stachowiak <mjs@eazel.com> writes:

> BonoboControl and BonoboControlFrame both hold refs on each other
> while they are live. This leads to resource leaks if you try to do
> proper refcounting on BonoboControlFrames instead of explicitly
> destroying them. This used to be masked by the fact that a control was
> destroyed if it was removed from its container, but now it is causing
> a real resource leak in nautilus.
> 
> Possible solutions:
> 
> * Add a bonobo_control_frame_unbind_from_control API call so you can
>   explicitly break the circular linkage.
> 
> * Have one of the two sides not hold a ref on the other.
> 
> * Ignore the problem, and document that ControlFrames be explicitly
>   destroyed, but this solution sucks.
> 
>  - Maciej
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-components-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.




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