natiny.view.destroy
natiny.view.destroy(view)
Destroys a view together with every view below it, and makes their handles invalid.
Parameters
| Name | Type | Description |
|---|---|---|
view |
number |
View handle from natiny.view.create |
Example
natiny.view.destroy(dialog)
dialog = nil
Notes
natiny.view.HOOK_DESTROYis called on the view first and then on each descendant, parents before children, while all of them can still be read.- An error raised by a Lua
natiny.view.HOOK_DESTROYhook is raised from this call once every view is gone.