lua-users home
lua-l archive

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


Thank you Fábio.
In this case it will work properly.
So, even the Aline libray has the function, we get back to the original question: Why there is no native function to mirror lua_createtable() from the C API?
tks,
Marco


On Wed, Jun 17, 2009 at 11:53 AM, Fabio Mascarenhas <mascarenhas@acm.org> wrote:
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




--
Marco Antonio Abreu
System Analist/Developer