wibox: Remove weak table hack

No idea what self referencing loops this refers to. Lua 5.1's and
LuaJIT's garbage collector both should handle cycles just fine. Things
only start getting complicated when you start using weak tables.

Unless someone comes up with an example where this patch causes a leak,
let's remove the weak table magic.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-10-05 20:35:04 +02:00
parent 332681aaad
commit 90044e00da
1 changed files with 1 additions and 4 deletions

View File

@ -158,11 +158,8 @@ local function new(args)
local ret = object()
local w = capi.drawin(args)
-- lua 5.1 and luajit have issues with self referencing loops
local avoid_leak = setmetatable({ret},{__mode="v"})
function w.get_wibox()
return avoid_leak[1]
return ret
end
ret.drawin = w