lua-users home
lua-l archive

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


On Wed, Jun 17, 2009 at 3:13 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Tue, Jun 16, 2009 at 11:25 PM, Marco Antonio
Abreu<mabreu.ti@gmail.com> wrote:
> Hi, Steve.
> It's a very good start, but do you know what happens with this occurencies
> when Lua VM run the garbage collector automatically? Does it collect this
> unused space before I fill then with some values?

Well, Fabio could give you a more definite answer but I don't think it
would be collected.

Lua's GC does not shrink tables, only a rehash (potentially) does, and a rehash will not be triggered while there are free hash slots available, so you do not have to worry about the table shrinking under you. Roberto's chapter in "Lua Programming Gems" has more information (Chapter 2).
 

steve d.

--
Fabio Mascarenhas