lua-users home
lua-l archive

Re: [5.1.4/newbie] How to check end script?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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

AltStyle によって変換されたページ (->オリジナル) /