[vlc-devel] commit: One child is one reference ( Rémi Denis-Courmont )

Pierre d'Herbemont pdherbemont at free.fr
Sat Sep 20 21:09:40 CEST 2008


On Sat, Sep 20, 2008 at 8:17 PM, git version control <git at videolan.org> wrote:
> vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Sep 20 18:48:33 2008 +0300| [559c876b10bf4391dc592cc5d21ae99124a4d5ec] | committer: Rémi Denis-Courmont
>
> One child is one reference
>
> Avoid objects being detached asynchronously too early.
> Side effect is that you cannot free your children in the destructor
> (that would be a reference loop).

I would yield() the child rather than the parent. Parent owns
children, mostly because they created the children.

Hence by releasing the only reference remaining of an object, we would
automatically discard (release and destroy if applicable) attached
children tree.

Pierre.



Pierre.



More information about the vlc-devel mailing list