[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4/newbie] How to check end script?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 8 Mar 2011 12:58:41 -0300
> Is it guaranteed by Lua that all __gc's are called when a script
> exit-returns? Or is just a random trait of the current implementation?
No. It is not even a random trait: when you call os.exit Lua will not
execute any __gc. (Lua 5.2 supports an extra argument to os.exit
that will force a proper close of the Lua state before exiting.)
-- Roberto