[clutter] backend: Remove atexit handlers
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] backend: Remove atexit handlers
- Date: Mon, 31 Oct 2011 10:51:30 +0000 (UTC)
commit 09de87b0e540bfb6c0fc12e34625388bcc12fdc9
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Mon Oct 24 12:07:30 2011 +0100
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.
clutter/cogl/clutter-backend-cogl.c | 9 ---------
clutter/wayland/clutter-backend-wayland.c | 9 ---------
2 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/clutter/cogl/clutter-backend-cogl.c b/clutter/cogl/clutter-backend-cogl.c
index 1ca8850..b6881c8 100644
--- a/clutter/cogl/clutter-backend-cogl.c
+++ b/clutter/cogl/clutter-backend-cogl.c
@@ -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;
}
diff --git a/clutter/wayland/clutter-backend-wayland.c b/clutter/wayland/clutter-backend-wayland.c
index 56c23a2..5ade5b3 100644
--- a/clutter/wayland/clutter-backend-wayland.c
+++ b/clutter/wayland/clutter-backend-wayland.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]