lua-users home
lua-l archive

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

On 1/16/06, CHU Run-min <> wrote:
> Thanks, I understand it.
> But lua-5.1 manual seems confusing me. It says
> "Finalizers allow you to coordinate Lua's garbage collection with
> external resource management (such as closing files, network or
> database connections, or freeing your own memory). "

it simply means that whenever Lua collects garbage, it would also
call the __gc metamethods you have defined. this means you're also
leaving it up to the GC when it will clean up resources you have defined.

to mu understanding at least.