[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: finalizer not called for userdata created inside finalizer
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 11 Apr 2012 12:51:09 -0300
> I see. In that case, using finalizers to implement a Lua-level
> atexit() doesn't seem like a viable technique.
>
> https://github.com/dcurrie/lunit/blob/master/atexit.lua
It does, as long as you use 'atexit' for typical 'atexit' uses, such as
cleaning up stuff. It really does not work if you want to run most of
your program inside an 'atexit'.
-- Roberto