[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Userdata environment
- From: Shmuel Zeigerman <shmuz@...>
- Date: Mon, 31 Mar 2008 19:37:54 +0200
Mike Pall wrote:
If you're storing all your userdatas in the array part, a simple
't.foo = nil' triggers the shrinking. If you'r storing them in
the hash part, a 't = nil' will do.
My userdatas are keys in a weak keyed table. I've just tried your recipe
in my application, both with t.foo=nil and with t=nil -- it didn't help.
Here's a modified version of your example:
for i=1,1e6,3 do t[i]=true end
for i=1,1e6,3 do t[i]=nil end
t.foo, t, t = nil