Gtk.Widget.dispose_template

### Method

# Gtk Widgetdispose_template

#### Declaration [src]

    void
    gtk_widget_dispose_template (
      GtkWidget* widget,
      GType widget_type
    )

#### Description [src]

Clears the template children for the given widget.

This function is the opposite of `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.

    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);
    }

Available since: | 4.8

#### Parameters

`widget_type` | `GType`
| The type of the widget to finalize the template for.