Fixes for dispose and finalize
* Add missing chain-up for dispose and finalize methods * ShellGenericContainer needs to destroy its children in dispose() * Fix variable naming and excess casts in st_label_dispose() https://bugzilla.gnome.org/show_bug.cgi?id=612511
This commit is contained in:
@ -228,6 +228,17 @@ shell_generic_container_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (shell_generic_container_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
shell_generic_container_dispose (GObject *object)
|
||||
{
|
||||
ShellGenericContainerPrivate *priv = SHELL_GENERIC_CONTAINER (object)->priv;
|
||||
|
||||
while (priv->children)
|
||||
clutter_actor_destroy (priv->children->data);
|
||||
|
||||
G_OBJECT_CLASS (shell_generic_container_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
||||
{
|
||||
@ -235,6 +246,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
|
||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = shell_generic_container_finalize;
|
||||
gobject_class->dispose = shell_generic_container_dispose;
|
||||
|
||||
actor_class->get_preferred_width = shell_generic_container_get_preferred_width;
|
||||
actor_class->get_preferred_height = shell_generic_container_get_preferred_height;
|
||||
|
Reference in New Issue
Block a user