Gtk.Widget.prototype.destroyed

function destroyed(widget_pointer:Gtk.Widget):void {
    // Gjs wrapper for gtk_widget_destroyed()
}

This function sets *widget_pointer to null if widget_pointer != null. It's intended to be used as a callback connected to the "destroy" signal of a widget. You connect Gtk.Widget.prototype.destroyed as a signal handler, and pass the address of your widget variable as user data. Then when the widget is destroyed, the variable will be set to null. Useful for example to avoid multiple copies of the same dialog.

widget_pointer

address of a variable that contains widget