View Single Post
08-08-07, 03:31 PM   #7
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
I think that the part that doesn't work is the one that clears the table. I also think that it's not really needed to have both the use of a metatable-cache via the "mode='k'" and a manual clear.

Here, a simple table will do just fine, I think. Start with
Code:
local data = {}
for i = 1,40 ....
And to clear the table, I would use
Code:
for key,_ in ipairs(data) do
  data[key]=nil
end
I'm not sure if it's needed, I'm not as pro as I could be in lua and I don't know how the garbage collector treats local variable, how their scope is handled exactly, etc...

If it still does the same, well, I just said a whole bunch of crap, sorry :/
  Reply With Quote