IupDestroy
Destroys an interface element and all of its descendants. Only dialogs, timers, popup menus and images should be normally destroyed, but detached controls can also be destroyed.
It will automatically unmap and detach the element if necessary.
Parameters/Return
void IupDestroy(Ihandle *ih); [in C] iup.Destroy(ih: ihandle) [in Lua] or ih:destroy() [in Lua]
ih: Identifier of the interface element to be destroyed.
Notes
This function also deletes the names associated to the interface elements being destroyed.
Menu bars associated with dialogs are automatically destroyed.
Images associated with controls are NOT destroyed, because images can be reused in several controls the application must destroy them when they are not used anymore.