I have a global GdkGlContext
which is shared by all widgets (such as GdkGLArea
), I used signal create-context
to make sure of this. I manually increase the reference count of this global context during application runtime. All OpenGL objects I create with glGen*
are created while this context is the active context.
If the GdkGLContext
instance is finalized because I called g_object_unref
enough times, but the runtime of the program does not yet end, will all the OpenGL resources I manually allocated also be freed automatically? Or do I have to manually call glDelete*
for each of them before the context is finalized?
I am unsure of how memory management works exactly with GdkGLContext
and GPU-programming is still somewhat new to me. Thank you.