|
Hi
Ok, but, IMHO, it seems an overkill. You could stay with the second case for functions too...1 - if its value is a function, that function is called (no parameters)
2 - if its value is a table/userdata, its __close (or some other new name) metamethod, if present, is called.
What's the problem with the __gc metamethod? Regards, Tomás