lua-users home
lua-l archive

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


I forget what is the standard solution to make Lua's GC
aware of the external cost of a "userdata" value. Sometimes
you have a userdata representing, say, an image. But the
image itself takes more room than the userdata because it
was allocated outside of Lua (sometimes you can't change
that). So Lua might not feel like collecting the userdata
eventhough it represents a lot of memory and is not
referenced anymore.

Can anyone refresh my memory?