[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: when do programs set metatable?
- From: Mark Hamburg <mhamburg@...>
- Date: Fri, 08 Feb 2008 11:31:36 -0800
If we explicitly invalidate a proxy object in Lightroom, we will set the
metatable on the proxy to a new metatable representing the invalid proxy.
But this isn't an incredibly common operation.
on 2/8/08 6:45 AM, Roberto Ierusalimschy at email@example.com wrote:
> 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.
> -- Roberto