static void release_perl_callback (gpointer data) { GPerlI11nPerlCallbackInfo *info = data; dwarn ("info = %p\n", info); /* g_callable_info_free_closure reaches into info->cif, so it needs to * be called before we free it. See * <https://bugzilla.gnome.org/show_bug.cgi?id=652954>. */ if (info->closure) g_callable_info_free_closure (info->interface, info->closure); if (info->cif) g_free (info->cif); if (info->interface) g_base_info_unref ((GIBaseInfo*) info->interface); if (info->code) SvREFCNT_dec (info->code); if (info->data) SvREFCNT_dec (info->data); if (info->sub_name) g_free (info->sub_name); if (info->args_converter) SvREFCNT_dec (info->args_converter); g_free (info); }
static void rb_gi_callback_free(RBGICallback *callback) { g_callable_info_free_closure(callback->callback_info, callback->closure); g_base_info_unref(callback->callback_info); g_base_info_unref(callback->type_info); xfree(callback); }
void _pygi_invoke_closure_free(gpointer data) { PyGICClosure* invoke_closure = (PyGICClosure *)data; Py_DECREF(invoke_closure->function); g_callable_info_free_closure(invoke_closure->info, invoke_closure->closure); if (invoke_closure->info) g_base_info_unref((GIBaseInfo*)invoke_closure->info); g_slice_free(PyGICClosure, invoke_closure); }
void _pygi_invoke_closure_free (gpointer data) { PyGICClosure* invoke_closure = (PyGICClosure *) data; g_callable_info_free_closure (invoke_closure->info, invoke_closure->closure); if (invoke_closure->info) g_base_info_unref ( (GIBaseInfo*) invoke_closure->info); if (invoke_closure->cache != NULL) pygi_callable_cache_free ((PyGICallableCache *) invoke_closure->cache); _pygi_invoke_closure_clear_py_data(invoke_closure); g_slice_free (PyGICClosure, invoke_closure); }