lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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