[ Version ( since = "4.8" ) ]
public void dispose_template (Type widget_type)

Clears the template children for the given widget.

This function is the opposite of [method@Gtk.Widget.init_template], and it is used to clear all the template children from a widget instance. If you bound a template child to a field in the instance structure, or in the instance private data structure, the field will be set to `NULL` after this function returns.

You should call this function inside the `GObjectClass.dispose()` implementation of any widget that called `gtk_widget_init_template()`. Typically, you will want to call this function last, right before chaining up to the parent type's dispose implementation, e.g.

```c static void some_widget_dispose (GObject *gobject) { SomeWidget *self = SOME_WIDGET (gobject);

// Clear the template data for SomeWidget gtk_widget_dispose_template (GTK_WIDGET (self), SOME_TYPE_WIDGET);

G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject); } ```



the widget with a template


the type of the widget to finalize the template for