refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-25 19:25:11 +02:00
parent db41eebbf2
commit fcd563fa76
2 changed files with 43 additions and 22 deletions
+2 -1
View File
@@ -34,7 +34,8 @@ do
return t
end
function public.recycle(t)
wipe(t)
while getn(t) > 0 do tremove(t) end -- TODO or is setn enough?
if next(t) then return end -- no hashtables, they can't be shrunk -- TODO "n" field?
if getn(pool) < 50 then
tinsert(pool, t)
else