|
Thanks Emmanuele, I understand the rationale. It just goes against my belief in a rule of thumb that the reference count of a pointer should always be incremented as soon as this pointer is assigned. Although the clutter scene graph should be seen as a descending graph only, every actor *does* hold a persistent pointer to the parent, and somehow supposes that this pointer is valid in many places, while there is no ref mechanism to guarantee such thing. Also, relying on clutter_actor_set_parent to increment the ref count of self is just not very intuitive. The chain of references up to the stage could have been consistently maintained by reversing the reference counting process of parenting, and no parent would be referenced in the stage. In the end the stage would have a reference count greater than the total number of actors in its scene graph, which is healthy in the same way in my mind. Michael Emmanuele Bassi wrote: On Sun, 2009-03-08 at 02:17 +0200, Michael Boccara wrote:Hi, -- To unsubscribe send a mail to [email protected] |
- [clutter] About clutter_actor_set_parent and reference cou... Michael Boccara
- Re: [clutter] About clutter_actor_set_parent and refe... Emmanuele Bassi
- Re: [clutter] About clutter_actor_set_parent and ... Michael Boccara
- Re: [clutter] About clutter_actor_set_parent ... Michael Boccara
- Re: [clutter] About clutter_actor_set_par... Noah Gibbs
