Destroys all objects in the given Lua state (calling the corresponding
garbage-collection metamethods, if any) and frees all dynamic memory
used by this state.
In several platforms, you may not need to call this function,
because all resources are naturally released when the host
program ends. On the other hand, long-running programs that create
multiple states, such as daemons or web servers, will probably need
to close states as soon as they are not needed.
Destroys all objects in the given Lua state.
Destroys all objects in the given Lua state (calling the corresponding garbage-collection metamethods, if any) and frees all dynamic memory used by this state. In several platforms, you may not need to call this function, because all resources are naturally released when the host program ends. On the other hand, long-running programs that create multiple states, such as daemons or web servers, will probably need to close states as soon as they are not needed.