[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: when do programs set metatable?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 8 Feb 2008 12:45:57 -0200
More often than not, programs set the metatable of a userdata right
after creating the userdata. Does anyone know of relevant counterexamples
to this pattern?
More specifically: if Lua puts a cost on setting the metatable of an
object long after its creation (the longer the more expensive), do you
know of programs that would be hurt?
Yet more specifically, I am interested only in cases where the metatable
has a __gc metamethod.