In GTK 3, gtk_file_chooser_get_files()
returns a GSList. In GTK 4, it returns a GListModel:
https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-get-files
https://developer.gnome.org/gtk4/stable/GtkFileChooser.html#gtk-file-chooser-get-files
https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html
https://developer.gnome.org/gio/stable/GListModel.html
So in my GTK4 code, I replaced successfully GSList functions by GListModel functions. But why is there no equivalent to g_slist_free()
? How can I free a GListModel ?