lua-users home
lua-l archive

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

> 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