[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __gc visible to lua code...
- From: Graham Wakefield <lists@...>
- Date: Fri, 30 Mar 2007 11:27:41 -0700
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.