lua-users home
lua-l archive

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


On Fri, Aug 21, 2009 at 3:03 PM, Chris Camacho<c.camacho@ntlworld.com> wrote:
> Will that collect the key or could I end up with a large table of
> nil values ? (just checking!)

it will destroy the pair, making both the key and the (previous) value
available for garbage collection.

of course, a lightuserdata is an atomic value, which doesn't need any
allocation/collection (just like a number, or a boolean)

-- 
Javier