MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_context_finalize

Function gjs_context_finalize

gjs/context.cpp:486–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484}
485
486static void gjs_context_finalize(GObject* object) {
487 if (gjs_context_get_current() == GJS_CONTEXT(object))
488 gjs_context_make_current(nullptr);
489
490 g_mutex_lock(&contexts_lock);
491 all_contexts = g_list_remove(all_contexts, object);
492 g_mutex_unlock(&contexts_lock);
493
494 GjsContextPrivate* gjs = GjsContextPrivate::from_object(object);
495 gjs->~GjsContextPrivate();
496 G_OBJECT_CLASS(gjs_context_parent_class)->finalize(object);
497
498 g_mutex_lock(&contexts_lock);
499 if (!all_contexts)
500 gjs_log_cleanup();
501 g_mutex_unlock(&contexts_lock);
502}
503
504static void gjs_context_constructed(GObject* object) {
505 GjsContext* self = GJS_CONTEXT(object);

Callers

nothing calls this directly

Calls 5

gjs_context_get_currentFunction · 0.85
gjs_context_make_currentFunction · 0.85
gjs_log_cleanupFunction · 0.85
~GjsContextPrivateMethod · 0.80
finalizeMethod · 0.45

Tested by

no test coverage detected