[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: state of the Lua nation on resource cleanup
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 11 Feb 2009 10:45:05 -0200
> Doing a collectgarbage after a pcall did help in some cases, and it
> usually is acceptable/expected that slow steps (e.g. garbage
> collection) are performed upon error recovery, but I'm not sure if
> this approach was more than just a hack. For one thing, would the
> order of close calls be deterministic? Here's a test:
You could trust the manual :)
At the end of each garbage-collection cycle, the finalizers for userdata
are called in reverse order of their creation, among those collected in
that cycle.
-- Roberto