Re: when do programs set metatable?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: when do programs set metatable?
- From: Mark Hamburg <mhamburg@...>
- Date: 2008年2月08日 11:34:49 -0800
So, it would presumably remain cheap to go from having a __gc metamethod to
having a different __gc metamethod. It could even be cheap to going from
having a __gc metamethod to not having a __gc metamethod provided the
finalization code dealt with the missing method case. What would be
expensive would be gaining a __gc metamethod well after creation? That seems
fairly reasonable.
Mark