awful.widget: abuse new object item system

We do not need this since we store all Lua refs into env table of
objects.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-06-10 12:12:24 +02:00
parent a1b113901c
commit 8c08fffaa9
2 changed files with 0 additions and 12 deletions

View File

@ -77,11 +77,6 @@ function new(screen, label, buttons)
end end
end) end)
u(screen) u(screen)
-- Free data on tag removal.
-- See tasklist to get why this is needed.
hooks.tags.register(function (s, tag, action)
if action == "remove" then data[tag] = nil end
end)
return w return w
end end

View File

@ -74,13 +74,6 @@ function new(label, buttons)
end end
end) end)
u() u()
-- Free data on unmanage.
-- You may thing we do not need to clear data[] on unmanage because it's a
-- weak-keyed table. But in fact we need, because it's a loop reference
-- between data[client] and data[client][i] = button(reference a client in
-- the Lua registry) and since the registry and the button() are totally
-- unconnected, Lua does not free anything.
hooks.unmanage.register(function (c) data[c] = nil end)
return w return w
end end