gtk4-rs
gtk4-rs copied to clipboard
Document that the GTK bindings can't be completely safe and document the caveats
Main known issue is related to disposed but not finalized widgets, which would happen when e.g. their surrounding window is closed. Calling anything on such widgets might crash or do whatever, and this is design constraint in GTK.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3711 for details.
This also effects GTK4, but probably nothing apart from GTK as it's AFAIK the only library calling g_object_run_dispose()
explicitly at specific times. It might also affect other GObject libraries if used together with a GC'd language binding in the same process but it's not entirely clear if the problems actually happen there in practice.
CC @bilelmoussaoui
More specifically, this only applies to widgets and not other GTK objects.
To be honest, this should probably be part of the gtk-rs book, it is a better place to write about this then in the documentations.
@Hofer-Julian What do you think?
Yeah, the book is probably a good place for that. In a supplementary chapter at the end or so.
Let us move this to gtk4-rs then