lua-users home
lua-l archive

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


> If I alternate g_collectNOW between false for a while (memory grows),
> then to true (gc every frame), the level that memory drops to for each
> gc-each-frame section is higher than the previous. Memory seems to be
> being irretrievably leaked.

I assume your userdata has __gc metamethods, is that right? Then, they
are collected in two phases: in a first GC cycle, their metamethods are
called; only in the next cycle they are actually deallocated (if the
metamethods did not "ressurect" them). That may (or may not :) explain
part of that behavior.

-- Roberto