natiny.surface.destroy

Lua
natiny.surface.destroy(surf)

Destroys a surface and releases its GPU resources.

Parameters

Name Type Description
surf number Surface handle from natiny.surface.create

Example

Lua
local rt = natiny.surface.create(512, 512)
natiny.surface.destroy(rt)

Notes

  • Do not use the surface handle after destroy.