diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-01-17 19:49:52 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-01-17 19:49:52 -0500 |
commit | 34c63b8e4f5068e855283e54bf76233a4e575a59 (patch) | |
tree | 080e4339854488cbd6a3bcd3d5642adddc9d72fa /gtk/gtkglarea.c | |
parent | 0429008b165d3af4db54fdc59967595e8d91e396 (diff) | |
download | gtk+-34c63b8e4f5068e855283e54bf76233a4e575a59.tar.gz |
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
Diffstat (limited to 'gtk/gtkglarea.c')
-rw-r--r-- | gtk/gtkglarea.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index 22348ee01c..f6254cf8a4 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); |