#7 It's better gdk_gl_context_finalize() destroys gl_context.

open
GtkGLExt (6)
5
2009-03-07
2006-05-28
Kouhei Sutou
No

We may cause memory leak if we only call
g_object_unref(gl_context) because
gdk_gl_context_finalize() doesn't call
_gdk_gl_context_destroy(). We can avoid the memory leak
by calling gdk_gl_context_destroy() instead of
g_object_unref() but this workaround has some problems.
* This isn't GLib-ish.
* We can't always call gdk_gl_context_destroy() for
doing unref gl_context. Someone may need gl_context.

Discussion

  • Kouhei Sutou
    Kouhei Sutou
    2006-05-28

    gdk_gl-context_finalize() destroys gl_context.

     
    • assigned_to: nobody --> braden