Remove handlers on free
authorsebastid <sebastid>
Sat, 23 Apr 2005 05:46:49 +0000 (05:46 +0000)
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 23 Apr 2005 05:46:49 +0000 (05:46 +0000)
SVN revision: 14308

src/bin/e_zone.c

index 0560754..724e5b8 100644 (file)
@@ -283,8 +283,19 @@ static void
 _e_zone_free(E_Zone *zone)
 {
    E_Container *con;
+   Evas_List *l;
    int x, y;
-   
+
+   /* remove handlers */
+   for (l = zone->handlers; l; l = l->next)
+     {
+       Ecore_Event_Handler *h;
+
+       h = l->next;
+       ecore_event_handler_del(h);
+     }
+   evas_list_free(zone->handlers);
+
    con = zone->container;
    if (zone->name) free(zone->name);
    con->zones = evas_list_remove(con->zones, zone);