Issue #7106: GIMP 2.99.6 Python Script Fatal Error.

All objects of subclass GtkWindow are special as they are actually owned
by GTK which keeps a list of all top-level windows. So we cannot
actually give ownership to the caller. With GObject Introspection in
particular, it will mean a double-free of the dialog object (by GTK,
then by the GI layer).

See also gobject-introspection#394.
This commit is contained in:
Jehan 2021-08-02 01:32:27 +02:00
parent 2d84ad719f
commit 1e31b6530d
1 changed files with 6 additions and 1 deletions

View File

@ -392,7 +392,12 @@ gimp_procedure_dialog_real_fill_list (GimpProcedureDialog *dialog,
* dialog title instead). If neither an explicit label nor a @procedure * dialog title instead). If neither an explicit label nor a @procedure
* menu label was set, the call will fail. * menu label was set, the call will fail.
* *
* Returns: (transfer full): the newly created #GimpProcedureDialog. * As for all #GtkWindow, the returned #GimpProcedureDialog object is
* owned by GTK and its initial reference is stored in an internal list
* of top-level windows. To delete the dialog, call
* gtk_widget_destroy().
*
* Returns: (transfer none): the newly created #GimpProcedureDialog.
*/ */
GtkWidget * GtkWidget *
gimp_procedure_dialog_new (GimpProcedure *procedure, gimp_procedure_dialog_new (GimpProcedure *procedure,