wibox.drawables: Fix a memleak
commit14fa66c63f8fdeba81e3fad75b6ca777bf7ef71f
authorUli Schlachter <psychon@znc.in>
Sat, 3 Nov 2012 18:43:31 +0000 (3 19:43 +0100)
committerUli Schlachter <psychon@znc.in>
Sat, 3 Nov 2012 18:52:39 +0000 (3 19:52 +0100)
tree318fe95d86769ba4a75bd0397a640d03a115c4f0
parent3c320927f80234a948a50ddc8eb3122d23982652
wibox.drawables: Fix a memleak

Drawables could never be garbage-collected, because of the "wallpaper_changed"
signal. The callback function for this signal kept a strong reference to the
drawable.

Fix this by putting all drawable's draw() methods into a weakly keyed tabled so
that the strong reference to them disappears.

Signed-off-by: Uli Schlachter <psychon@znc.in>
lib/wibox/drawable.lua.in