[gtk+] glarea: Drop the dispose vfunc
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] glarea: Drop the dispose vfunc
- Date: Thu, 18 Jan 2018 00:51:22 +0000 (UTC)
commit 34c63b8e4f5068e855283e54bf76233a4e575a59
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 17 19:49:52 2018 -0500
glarea: Drop the dispose vfunc
This was causing us to leak, in the following scenario:
1) gtk_widget_destroy is called on a GL area
2) dispose is run and clears the context
3) the GL area is unrealized, but the context is already cleared,
so we leak all the GL buffers
gtk/gtkglarea.c | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index 22348ee..f6254cf 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -202,17 +202,6 @@ static guint area_signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE_WITH_PRIVATE (GtkGLArea, gtk_gl_area, GTK_TYPE_WIDGET)
static void
-gtk_gl_area_dispose (GObject *gobject)
-{
- GtkGLArea *area = GTK_GL_AREA (gobject);
- GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
-
- g_clear_object (&priv->context);
-
- G_OBJECT_CLASS (gtk_gl_area_parent_class)->dispose (gobject);
-}
-
-static void
gtk_gl_area_set_property (GObject *gobject,
guint prop_id,
const GValue *value,
@@ -891,7 +880,6 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
gobject_class->set_property = gtk_gl_area_set_property;
gobject_class->get_property = gtk_gl_area_get_property;
- gobject_class->dispose = gtk_gl_area_dispose;
gobject_class->notify = gtk_gl_area_notify;
g_object_class_install_properties (gobject_class, LAST_PROP, obj_props);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]