MainContext.refThreadDefault

Gets the thread-default #GMainContext for this thread, as with g_main_context_get_thread_default(), but also adds a reference to it with g_main_context_ref(). In addition, unlike g_main_context_get_thread_default(), if the thread-default context is the global default context, this will return that #GMainContext (with a ref added to it) rather than returning %NULL.

class MainContext
static
refThreadDefault
()

Return Value

the thread-default #GMainContext. Unref with g_main_context_unref() when you are done with it.

Meta

Since

2.32