GtkGLArea: Should gtk_gl_area_dispose() be dropped in gtk3?
gtk_gl_area_dispose() has been dropped in gtk4. See commit 34c63b8e
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
This is a nuisance in gtkmm, e.g. in the GLArea demo, which is gtkmm's version of the corresponding demo in gtk (gtkmm#63 (closed)). gtk_gl_area_dispose() is called before the unrealize signal is emitted. When the unrealize handler is called, the GdkGLContext has been deleted.
Is there a reason for not dropping gtk_gl_area_dispose() in gtk3?