lua-users home
lua-l archive

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

John Dunn wrote:
> Does having an empty table as the userdata environment have much
> affect on memory usage? Most of my objects probably won't have
> handlers.  

Yes, tables have a memory usage, but it depends on how much tables you have. However you don't have to set an environment table to userdata that don't have handlers. Just check if there's one in the add_handler, and if not create one. If most of your objects don't have handlers most won't have environment tables.