backend: Remove atexit handlers

The g_atexit() function has been deprecated in GLib as it is a fairly
bad idea in basically all cases.

We could probably use a GCC destructor if we didn't care about
portability, but for the time being we just remove the atexit() handler
that disposed the backend.
This commit is contained in:
Emmanuele Bassi 2011-10-24 12:07:30 +01:00
parent d97a8c431b
commit 09de87b0e5
2 changed files with 0 additions and 18 deletions

View File

@ -71,13 +71,6 @@ G_DEFINE_TYPE (ClutterBackendCogl, _clutter_backend_cogl, CLUTTER_TYPE_BACKEND_X
G_DEFINE_TYPE (ClutterBackendCogl, _clutter_backend_cogl, CLUTTER_TYPE_BACKEND);
#endif
static void
clutter_backend_at_exit (void)
{
if (backend_singleton)
g_object_run_dispose (G_OBJECT (backend_singleton));
}
const gchar*
_clutter_backend_cogl_get_vblank (void)
{
@ -124,8 +117,6 @@ clutter_backend_cogl_post_parse (ClutterBackend *backend,
return TRUE;
#endif
g_atexit (clutter_backend_at_exit);
return TRUE;
}

View File

@ -52,13 +52,6 @@ static ClutterBackendWayland *backend_singleton = NULL;
G_DEFINE_TYPE (ClutterBackendWayland, _clutter_backend_wayland, CLUTTER_TYPE_BACKEND);
static void
clutter_backend_at_exit (void)
{
if (backend_singleton)
g_object_run_dispose (G_OBJECT (backend_singleton));
}
static gboolean
clutter_backend_wayland_pre_parse (ClutterBackend *backend,
GError **error)
@ -281,8 +274,6 @@ clutter_backend_wayland_post_parse (ClutterBackend *backend,
ClutterBackendWayland *backend_wayland = CLUTTER_BACKEND_WAYLAND (backend);
EGLBoolean status;
g_atexit (clutter_backend_at_exit);
/* TODO: expose environment variable/commandline option for this... */
backend_wayland->wayland_display = wl_display_connect (NULL);
if (!backend_wayland->wayland_display)