Use clutter_actor_destroy in dispose, add _dispose where needed

ClutterGroup calls _destroy, but most of St was just calling _unparent.
This caused problems because the DESTROY signal was not emitted
for child elements after destroying a toplevel.  Also, in a GC'd
binding it would cause unpredictable lifetime of children.

Some St widgets simply didn't have _dispose at all; implement it.

Note because of the usage of the background_image in StButton,
we can't cleanly destroy it inside the StWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=597845
This commit is contained in:
Colin Walters
2009-10-08 14:53:46 -04:00
parent a27c29f4fc
commit ab0460ad59
7 changed files with 38 additions and 20 deletions

View File

@ -129,13 +129,13 @@ st_scroll_view_dispose (GObject *object)
if (priv->vscroll)
{
clutter_actor_unparent (priv->vscroll);
clutter_actor_destroy (priv->vscroll);
priv->vscroll = NULL;
}
if (priv->hscroll)
{
clutter_actor_unparent (priv->hscroll);
clutter_actor_destroy (priv->hscroll);
priv->hscroll = NULL;
}