client, wibox: unref image on garbage collection

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-13 12:36:23 +02:00
parent f0a11b9628
commit a08794d7cd
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);