Added a GTK3 finalize handler for GtkXText that chains to the parent class alongside the existing dispose cleanup path.

Registered the GTK3 finalize handler in gtk_xtext_class_init while keeping GTK2 destroy registration intact.
This commit is contained in:
2026-01-29 22:49:13 -07:00
parent bf529ba1ff
commit 49e23b7df5

View File

@@ -774,6 +774,13 @@ gtk_xtext_dispose (GObject *object)
if (G_OBJECT_CLASS (parent_class)->dispose)
(*G_OBJECT_CLASS (parent_class)->dispose) (object);
}
static void
gtk_xtext_finalize (GObject *object)
{
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
#endif
static void
@@ -2646,6 +2653,7 @@ gtk_xtext_class_init (GtkXTextClass * class)
#if HAVE_GTK3
object_class->dispose = gtk_xtext_dispose;
object_class->finalize = gtk_xtext_finalize;
#else
object_class->destroy = gtk_xtext_destroy;
#endif