[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: cons cells for Lua
- From: Mark Hamburg <mhamburg@...>
- Date: Thu, 25 Mar 2004 14:02:09 -0800
on 3/25/04 9:52 AM, Virgil Smith at Virgil@Nomadics.com wrote:
> For per userdata instance Lua data I recommend using a weak keyed table
> inside the metatable for the userdata "type". This way the metatable
> uniqueness is still a "type identifier", but per instance data is easily
getmetatable( ud ).linkedData[ ud ]
Where linkedData is weak-keyed?
The problem is that this is prone to reference cycles since the value side
of the table will all be marked.
Or did you have something else in mind?