woohyun pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=33faa2ffd8063dcbd7d06a1a27d6fa1d1c239e76

commit 33faa2ffd8063dcbd7d06a1a27d6fa1d1c239e76
Author: Hosang Kim <hosang12....@samsung.com>
Date:   Tue Aug 25 20:05:57 2015 +0900

    progressbar: fix memory leak
    
    Summary: when elm_progressbar_value_set is called, progress_status is 
always created.
    
    Test Plan: elementary_test -> progressbar
    
    Reviewers: woohyun, Hermet, cedric, raster
    
    Differential Revision: https://phab.enlightenment.org/D2986
---
 src/lib/elm_progressbar.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/lib/elm_progressbar.c b/src/lib/elm_progressbar.c
index 1fbaab3..aa34ec0 100644
--- a/src/lib/elm_progressbar.c
+++ b/src/lib/elm_progressbar.c
@@ -424,20 +424,9 @@ _elm_progressbar_part_value_get(const Eo *obj EINA_UNUSED, 
Elm_Progressbar_Data
 EOLIAN static void
 _elm_progressbar_value_set(Eo *obj, Elm_Progressbar_Data *sd, double val)
 {
-   Elm_Progress_Status *ps;
-
    if (sd->val == val) return;
 
-   sd->val = val;
-   if (sd->val < MIN_RATIO_LVL) sd->val = MIN_RATIO_LVL;
-   if (sd->val > MAX_RATIO_LVL) sd->val = MAX_RATIO_LVL;
-
-   ps = _progress_status_new("elm.cur.progressbar", sd->val);
-   sd->progress_status = eina_list_append(sd->progress_status, ps);
-   _val_set(obj);
-   _units_set(obj);
-   eo_do(obj, eo_event_callback_call
-     (ELM_PROGRESSBAR_EVENT_CHANGED, NULL));
+   elm_progressbar_part_value_set(obj, "elm.cur.progressbar", val);
 }
 
 EOLIAN static double

-- 


Reply via email to