Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gio: Work around GLib memory leak in g_dbus_connection_register_objec… #1600

Merged

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Dec 10, 2024

…t_with_closures()

Assume that the invocation is passed as transfer full into the closure.

This workaround is not going to break with future versions of GLib as fixing the bug was considered a breaking API change.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4427


CC @sophie-h

…t_with_closures()

Assume that the invocation is passed as `transfer full` into the
closure.

This workaround is not going to break with future versions of
GLib as fixing the bug was considered a breaking API change.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4427
@sdroege sdroege added the needs-backport PR needs backporting to the current stable branch label Dec 10, 2024
Comment on lines +229 to +232
let invocation = from_glib_full(glib::gobject_ffi::g_value_get_object(
args[6].as_ptr(),
)
as *mut ffi::GDBusMethodInvocation);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is a bit strange, not sure why rustfmt does this

@sdroege
Copy link
Member Author

sdroege commented Dec 10, 2024

This breaks on the CI until GLib >= 2.82.4 or < 2.82.3 is available there.

@sophie-h
Copy link
Contributor

What a mess overall. I think the upstream function should be deprecated when there is a new one.

@sdroege
Copy link
Member Author

sdroege commented Dec 11, 2024

That's the plan, probably: https://gitlab.gnome.org/GNOME/glib/-/issues/3560

@sdroege sdroege merged commit 83f2e55 into gtk-rs:main Dec 13, 2024
48 checks passed
@sdroege sdroege deleted the gdbus-register-object-with-closures-memleak branch December 13, 2024 13:37
@sdroege sdroege removed the needs-backport PR needs backporting to the current stable branch label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants