destroy_all_children


Description:

[ Version ( since = "1.10" ) ]
public void destroy_all_children ()

Destroys all children of this.

This function releases the reference added by inserting a child actor in the list of children of this, and ensures that the destroy signal is emitted on each child of the actor.

By default, Actor will emit the destroy signal when its reference count drops to 0; the default handler of the destroy signal will destroy all the children of an actor. This function ensures that all children are destroyed, instead of just removed from this, unlike remove_all_children which will merely release the reference and remove each child.

Unless you acquired an additional reference on each child of this prior to calling remove_all_children and want to reuse the actors, you should use destroy_all_children in order to make sure that children are destroyed and signal handlers are disconnected even in cases where circular references prevent this from automatically happening through reference counting alone.

Parameters:

this

a Actor




2022 vala-language.org