lua-users home
lua-l archive

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


Eero Pajarre wrote:
> 
> Lua parser (at least on my lua 4.x version) seems to
> increase gc threshold on purpose after parsing some
> new code.
/snip
> In the specific case you described this leads to
> a leakage like behavior. I think forcing GC as
> you now do is the correct fix.
> 
>                 Eero

Of course, in the generic case, what lua does is correct. 
When a function is defined /usually/ it will remain defined.
It is therefore /usually/ a good idea to increase the gc 
threshold to prevent garbage collection whilst the function 
is defined. I think the case where one and the same
function is redefined more than, about 10 times is 
a "pathological" case. Such a situation should be avoided
as much as possible.



-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be