[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: light userdata (Was: Fastest way to transfer data from C to Lua ?)
- From: Kevin Martin <kev82@...>
- Date: Sun, 9 Jun 2013 16:26:53 +0100
On 9 Jun 2013, at 12:05, Tim Hill wrote:
> so it is of limited use unless the pointer is to static memory or heap memory that will not be released until after the Lua state is closed. I'm with you.
This isn't true if the light userdata are stored in a table which has a gc metamethod to call the appropriate free function.
I hardly ever use full userdata as an object, but instead use a table and put light userdata in it. I find it much more flexible than full userdata.
Kevin