MainContext.refThreadDefault

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

class MainContext
static
refThreadDefault
()

Return Value

the thread-default glib.MainContext Unref with MainContext.unref when you are done with it.

Meta

Since

2.32