[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: -c option to lua standalone
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 17 Jan 2001 11:18:42 -0200
> What's the point of this? Since the program immediately exits anyway after
> calling lua_close, it's not obvious what effect this could have.
Some OS have problems with programs that do not deallocate their memory.
Also, lua_close will call the GC tag method for all userdata in the
program; if you are using extensions, that may free other resorces as well.
On the other hand, to always call lua_close can be quite expensive for
systems that do not need that.
(it also helps a lot for testing ;-)