client, wibox: unref image on garbage collection
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f0a11b9628
commit
a08794d7cd
1
client.c
1
client.c
|
@ -53,6 +53,7 @@ luaA_client_gc(lua_State *L)
|
||||||
{
|
{
|
||||||
client_t *c = luaL_checkudata(L, 1, "client");
|
client_t *c = luaL_checkudata(L, 1, "client");
|
||||||
button_array_wipe(&c->buttons);
|
button_array_wipe(&c->buttons);
|
||||||
|
image_unref(L, c->icon);
|
||||||
p_delete(&c->class);
|
p_delete(&c->class);
|
||||||
p_delete(&c->instance);
|
p_delete(&c->instance);
|
||||||
p_delete(&c->icon_name);
|
p_delete(&c->icon_name);
|
||||||
|
|
1
wibox.c
1
wibox.c
|
@ -40,6 +40,7 @@ luaA_wibox_gc(lua_State *L)
|
||||||
wibox_t *wibox = luaL_checkudata(L, 1, "wibox");
|
wibox_t *wibox = luaL_checkudata(L, 1, "wibox");
|
||||||
simplewindow_wipe(&wibox->sw);
|
simplewindow_wipe(&wibox->sw);
|
||||||
button_array_wipe(&wibox->buttons);
|
button_array_wipe(&wibox->buttons);
|
||||||
|
image_unref(L, wibox->bg_image);
|
||||||
luaL_unref(L, LUA_REGISTRYINDEX, wibox->widgets_table);
|
luaL_unref(L, LUA_REGISTRYINDEX, wibox->widgets_table);
|
||||||
luaL_unref(L, LUA_REGISTRYINDEX, wibox->mouse_enter);
|
luaL_unref(L, LUA_REGISTRYINDEX, wibox->mouse_enter);
|
||||||
luaL_unref(L, LUA_REGISTRYINDEX, wibox->mouse_leave);
|
luaL_unref(L, LUA_REGISTRYINDEX, wibox->mouse_leave);
|
||||||
|
|
Loading…
Reference in New Issue