lua-users home
lua-l archive

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


Javier Guerra wrote:
was that a table of userdata's? or light userdata? or mabye a full
userdata that holds only a pointer?  in the second or third case, Lua
has no way to know how much RAM your object really holds, maybe from
it's side a couple thousands of pointers is just a few KB's but from C
it's several MB's.

in that case, you should have a 'close' method to release your object
and not rely on __gc(), because it might not occur soon enough.

Maybe I wasn't clear enough: the 100+ MBytes used memory is reported *by Lua*, and won't be freed by garbage collector.

--
Shmuel