improved memory usage with groups

This commit is contained in:
Enrique García Cota 2012-03-06 00:39:14 +01:00
parent 9cea9e9c1e
commit 069f5e8bd2

View File

@ -103,7 +103,7 @@ local currentGroupId = nil
local function addIdToCurrentGroup(id)
if currentGroupId then
groups[currentGroupId] = groups[currentGroupId] or {}
groups[currentGroupId] = groups[currentGroupId] or setmetatable({}, {__mode="k"})
local group = groups[currentGroupId]
group[#group + 1] = id
end