Fixes #556 and probably also #535
Replaced deprecated g_callable_info_prepare_closure
and g_callable_info_free_closure
with new APIs g_callable_info_create_closure
and g_callable_info_destroy_closure
. The pointer from to g_callable_info_create_closure
is passed to g_callable_info_get_closure_native_address
to obtain another pointer equivalent to the return value from the old prepare_closure
API and then is saved to a new field in PyGICClosure. The value of the new field is used for freeing with g_callable_info_destroy_closure
. The previous code called g_callable_info_free_closure
which does nothing and leaks memory resulting in issue #556.