## NAME

destroy - Destroy one or more windows

## SYNOPSIS

$widget->destroy

## DESCRIPTION

This command deletes the window related to $widget, plus all its descendants. If all the MainWindows are deleted then the entire application will be destroyed.

The perl object $widget continues to exist while references to it still exist, e.g. until variable goes out of scope. However any attempt to use Tk methods on the object will fail. Exists($widget) will return false on such objects.

Note however that while a window exists for $widget the perl object is maintained (due to "references" in perl/Tk internals) even though original variables may have gone out of scope. (Normally this is intuitive.)

## KEYWORDS

application, destroy, window