lua-users home
lua-l archive

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


In most of my libraries, I have close metamethods that are exactly synonymous for __gc. That is, they call the same C function. This is so that I can clean up resources whenever I want, but if I ever forget, the garbage collector is there to cover me. I use 'close' because it is nicer to write that '__gc'.

Right; now I know that __gc is public anyway, I think I'll do the same.