[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Custom stand-alone Lua
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 05 Jun 2002 09:15:31 -0300
> The stand-alone Lua executable has the -c option, to "call lua_close
> after running all arguments". For me, I have to put this option
> systematically. So why is this an option? In which cases it can be
> unnecessary, or even troublesome, to use it?
In several "common" platforms (such as most Unixes and Windows) you
get nothing by closing the state, as all resorces (memory and file
descriptors) are automatically released by the system when the program
On the other hand, closing a large state takes some time, as Lua has to
release all memory it was using.