[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1: debug.sethook() may cause leaks
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 17 Jan 2012 01:11:12 +0400
On Mon, Jan 16, 2012 at 19:52, Arseny Vakhrushev
<arseny.vakhrushev@gmail.com> wrote:
> local function printState()
> collectgarbage 'collect'
> print(collectgarbage 'count')
> end
Note that, in general, for vanilla 5.1, you should call
collectgarbage("collect") in a loop until collectgarbage("count")
result wouldn't stop decreasing. Only then you may say that everything
collectable is collected.
That being said, this issue apparently does not affect your case, I've
just checked, and I can reproduce your results even with GC in a loop.
Alexander.