summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-05-26 14:37:10 +0900
committerHermet Park <chuneon.park@samsung.com>2020-05-26 14:42:06 +0900
commit461a709e7f81fb8b3daa8d9ece521d892356987b (patch)
tree8961ea2e2e1cff5ed241d6bfeb071f00c970810f
parentc0c5bc71c5960408ceac135eb8fc250683d55ffd (diff)
edje: fix animation memory leak.
if object is destructed on canvas animation, its internal resource is leaked. Here simple fix brings stopping animation before deleting obj. @fix
-rw-r--r--src/lib/edje/edje_load.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 783d8d0312..2fb3da0267 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -1881,14 +1881,6 @@ _edje_file_del(Edje *ed)
1881 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 1881 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
1882 _edje_entry_real_part_shutdown(ed, rp); 1882 _edje_entry_real_part_shutdown(ed, rp);
1883 1883
1884 if (rp->object)
1885 {
1886 _edje_callbacks_focus_del(rp->object, ed);
1887 _edje_callbacks_del(rp->object, ed);
1888 evas_object_del(rp->object);
1889 rp->object = NULL;
1890 }
1891
1892 if (rp->custom) 1884 if (rp->custom)
1893 { 1885 {
1894 // xxx: lua2 1886 // xxx: lua2
@@ -1956,7 +1948,10 @@ _edje_file_del(Edje *ed)
1956 (rp->typedata.vector)) 1948 (rp->typedata.vector))
1957 { 1949 {
1958 if (rp->typedata.vector->anim) 1950 if (rp->typedata.vector->anim)
1959 efl_del(rp->typedata.vector->anim); 1951 {
1952 efl_canvas_object_animation_stop(rp->object);
1953 efl_del(rp->typedata.vector->anim);
1954 }
1960 if (rp->typedata.vector->lottie_virtual_file) 1955 if (rp->typedata.vector->lottie_virtual_file)
1961 eina_file_close(rp->typedata.vector->lottie_virtual_file); 1956 eina_file_close(rp->typedata.vector->lottie_virtual_file);
1962 if (rp->typedata.vector->lottie_data) 1957 if (rp->typedata.vector->lottie_data)
@@ -1966,6 +1961,14 @@ _edje_file_del(Edje *ed)
1966 rp->typedata.vector = NULL; 1961 rp->typedata.vector = NULL;
1967 } 1962 }
1968 1963
1964 if (rp->object)
1965 {
1966 _edje_callbacks_focus_del(rp->object, ed);
1967 _edje_callbacks_del(rp->object, ed);
1968 evas_object_del(rp->object);
1969 rp->object = NULL;
1970 }
1971
1969 /* Cleanup optional part. */ 1972 /* Cleanup optional part. */
1970 free(rp->drag); 1973 free(rp->drag);
1971 rp->drag = NULL; 1974 rp->drag = NULL;