backend: Move one-off free in finalize()
Instead of using dispose().
This commit is contained in:
parent
7ca340fade
commit
005a99f346
@ -82,7 +82,6 @@ static guint backend_signals[LAST_SIGNAL] = { 0, };
|
|||||||
static void
|
static void
|
||||||
clutter_backend_dispose (GObject *gobject)
|
clutter_backend_dispose (GObject *gobject)
|
||||||
{
|
{
|
||||||
ClutterBackend *backend = CLUTTER_BACKEND (gobject);
|
|
||||||
ClutterMainContext *clutter_context;
|
ClutterMainContext *clutter_context;
|
||||||
|
|
||||||
clutter_context = _clutter_context_get_default ();
|
clutter_context = _clutter_context_get_default ();
|
||||||
@ -96,12 +95,18 @@ clutter_backend_dispose (GObject *gobject)
|
|||||||
clutter_context->events_queue = NULL;
|
clutter_context->events_queue = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (backend->priv->font_name);
|
G_OBJECT_CLASS (clutter_backend_parent_class)->dispose (gobject);
|
||||||
backend->priv->font_name = NULL;
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_backend_finalize (GObject *gobject)
|
||||||
|
{
|
||||||
|
ClutterBackend *backend = CLUTTER_BACKEND (gobject);
|
||||||
|
|
||||||
|
g_free (backend->priv->font_name);
|
||||||
clutter_backend_set_font_options (backend, NULL);
|
clutter_backend_set_font_options (backend, NULL);
|
||||||
|
|
||||||
G_OBJECT_CLASS (clutter_backend_parent_class)->dispose (gobject);
|
G_OBJECT_CLASS (clutter_backend_parent_class)->finalize (gobject);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gfloat
|
static gfloat
|
||||||
@ -197,6 +202,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
|
|||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
gobject_class->dispose = clutter_backend_dispose;
|
gobject_class->dispose = clutter_backend_dispose;
|
||||||
|
gobject_class->finalize = clutter_backend_finalize;
|
||||||
|
|
||||||
g_type_class_add_private (gobject_class, sizeof (ClutterBackendPrivate));
|
g_type_class_add_private (gobject_class, sizeof (ClutterBackendPrivate));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user