Fix memory leak and delete unnecessary inputmgr_remove_callback 03/49503/1
authorjinwoo.shin <jw0227.shin@samsung.com>
Wed, 14 Oct 2015 06:03:45 +0000 (15:03 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Wed, 14 Oct 2015 06:04:51 +0000 (15:04 +0900)
Change-Id: Id7f4b7de4d09beae397487de68d15711406947ea
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
src/notification_view.c
src/square_view.c

index bfcd6b1..3f9e622 100644 (file)
@@ -532,25 +532,13 @@ static void _destroy(void *view_data)
 
        notification_unresister_changed_cb(_notification_changed_cb);
 
-       inputmgr_remove_callback(priv->clear_btn, &clear_handler);
-       inputmgr_remove_callback(priv->base, &base_handler);
-
        evas_object_del(priv->base);
 
        elm_gengrid_item_class_free(priv->grid_class);
 
        for (i = CATEGORY_FIRST; i < CATEGORY_MAX; i++) {
-               if (priv->category[i]) {
-                       inputmgr_remove_callback(priv->category[i]->title,
-                                       &category_handler);
-                       inputmgr_remove_callback(priv->category[i]->title,
-                                       &focus_handler);
-                       inputmgr_remove_callback(priv->category[i]->grid,
-                                       &category_handler);
-                       inputmgr_remove_callback(priv->category[i]->grid,
-                                       &focus_handler);
+               if (priv->category[i])
                        free(priv->category[i]);
-               }
        }
 
        free(priv);
index 76f99e6..4f3a24a 100644 (file)
@@ -393,12 +393,13 @@ static void _destroy(void *view_data)
 
        priv = (struct _priv *) view_data;
 
+       elm_box_clear(priv->list);
+
        stop_clock_timer(priv);
+
        notification_unresister_changed_cb(_noti_changed_cb);
        evas_object_smart_callback_del(priv->list, SIGNAL_CHILD_REMOVED,
                        _child_removed_cb);
-       inputmgr_remove_callback(priv->clear_btn, &button_handler);
-       inputmgr_remove_callback(priv->launch_btn, &button_handler);
 
        evas_object_del(priv->base);
 
@@ -509,8 +510,6 @@ static void _child_removed_cb(void *data, Evas_Object *obj, void *ei)
        noti = evas_object_data_del(item, KEY_NOTI);
        if (noti)
                notification_free(noti);
-
-       inputmgr_remove_callback(obj, &button_handler);
 }
 
 static view_class vclass = {