Modules/FileSystem/object/destroy

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function destroys the underlying object passed to it, rendering all Lua references to it null and void. All OS handles that had been associated with it are released.

Syntax

nil fsobject:destroy ()

Returns

This function returns nil.

Remarks

It is a good idea to call this function on all files or translators whose use has expired. This way the release of OS resources is guaranteed to happen at a predictable point in time. Since all Eir FileSystem objects are garbage collected by default it is strictly-speaking not a must, but a strong recommendation. Adhering to this recommendation is a strong guideline for clean programming practice.

Example

-- TODO.

FileSystem Object Functions

FileSystem Translator Functions

FileSystem File Functions