From 90044e00da0b9b2f4bb53cf8811f32cfa3a3a106 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 5 Oct 2016 20:35:04 +0200 Subject: [PATCH] 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 --- lib/wibox/init.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/wibox/init.lua b/lib/wibox/init.lua index a078534e9..f186a61bb 100644 --- a/lib/wibox/init.lua +++ b/lib/wibox/init.lua @@ -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