On Mon, 2008-03-31 at 18:14 +0300, Tommi Komulainen wrote:
> On Sun, Mar 30, 2008 at 2:51 AM, Matthew Allum <[EMAIL PROTECTED]> wrote:
> >
> >  The X11 backend is not cleaning up properly as yet when an extra stage
> >  is closed but its not crashing (but is emitting warnings). It shouldn't
> >  be anything that major, I'll take a look asap if you dont beat me to it.
> 
> OK, attached patches should fix the immediate issues I've found.
> 
> Destroying the stage raises an interesting issue regarding memory
> management, I think. How should the lifecycle of behaviours and
> timelines be managed in such a case?

it shouldn't.

timelines and behaviours are top-level objects, just as much as a stage.
while a stage directly controls the actors it's just a byproduct of the
parent-child relationship. a stage doesn't handle timelines nor
behaviours.

we cannot make

> The very least behaviours should notice when actors get destroyed and
> stop updating them,

yes, this is definitely a missing bit of the implementation; a behaviour
should by default attach a weak ref on every actor it's applied to and
update itself when the reference disappear. if nobody beats me to it,
I'll just write a patch doing that as soon as I can.

>  but it could be convenient to be able to 'attach'
> a timeline/behaviour to actor(s) so that when all actors are gone, so
> would the timeline. Quite similar to floating references and
> containers, but in reverse.
> 
> Thoughts?

you'd want a clutter_behaviour_attach() call, but I'm wary of adding it
because I fear huge reference cycles. :-/

it could be done, though, within the same lines as gtk_menu_attach()
(call this function when the actor is destroyed), and it would be useful
to destroy eventual state.

patches welcome; and if someone wants to start contributing to Clutter I
think this would be a great starting point. :-)

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, OpenedHand Ltd.
Unit R, Homesdale Business Centre
216-218 Homesdale Rd., Bromley - BR12QZ
http://www.o-hand.com

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to