[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4/newbie] How to check end script?
- From: Axel Kittenberger <axkibe@...>
- Date: Tue, 8 Mar 2011 17:07:22 +0100
Sorry I ment the other way around, is GC everything guaranteed on end
of script due to return?
On Tue, Mar 8, 2011 at 4:58 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> 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
>
>