lua-users home
lua-l archive

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


On Wed, Dec 29, 2010 at 5:43 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> But now, if you want to stop the GC after collectgarbage(), you can
>> explicitly call collectgarbage"stop" .
>> Perhaps the change would make it more logical, but i don't think it makes a
>> lot of difference.
>>
>> Or does it?
>
> The main problem is compatibility. If a program relies on the current
> behavior, this change will make the program run forever with the
> collector stopped. So, someone changes from Lua 5.1 to Lua 5.2 and
> suddenly his program starts consuming huge ammounts of memory; this
> is not good publicity :)

I like the idea of a "gc" function that is a drop-in replacement for
collectgarbage (name makes more sense in my opinion). Then, the
current collectgarbage can just be kept for compatibility. People are
encouraged to switch to "gc".

-- 
- Patrick Donnelly