natiny.view.destroy

Lua
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

Lua
natiny.view.destroy(dialog)
dialog = nil

Notes

  • natiny.view.HOOK_DESTROY is 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_DESTROY hook is raised from this call once every view is gone.