diff options
author | Hermet Park <chuneon.park@samsung.com> | 2020-05-26 14:37:10 +0900 |
---|---|---|
committer | Hermet Park <chuneon.park@samsung.com> | 2020-05-26 14:42:06 +0900 |
commit | 461a709e7f81fb8b3daa8d9ece521d892356987b (patch) | |
tree | 8961ea2e2e1cff5ed241d6bfeb071f00c970810f | |
parent | c0c5bc71c5960408ceac135eb8fc250683d55ffd (diff) | |
download | efl-461a709e7f81fb8b3daa8d9ece521d892356987b.tar.gz |
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.c | 21 |
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) if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) _edje_entry_real_part_shutdown(ed, rp); - if (rp->object) - { - _edje_callbacks_focus_del(rp->object, ed); - _edje_callbacks_del(rp->object, ed); - evas_object_del(rp->object); - rp->object = NULL; - } - if (rp->custom) { // xxx: lua2 @@ -1956,7 +1948,10 @@ _edje_file_del(Edje *ed) (rp->typedata.vector)) { if (rp->typedata.vector->anim) - efl_del(rp->typedata.vector->anim); + { + efl_canvas_object_animation_stop(rp->object); + efl_del(rp->typedata.vector->anim); + } if (rp->typedata.vector->lottie_virtual_file) eina_file_close(rp->typedata.vector->lottie_virtual_file); if (rp->typedata.vector->lottie_data) @@ -1966,6 +1961,14 @@ _edje_file_del(Edje *ed) rp->typedata.vector = NULL; } + if (rp->object) + { + _edje_callbacks_focus_del(rp->object, ed); + _edje_callbacks_del(rp->object, ed); + evas_object_del(rp->object); + rp->object = NULL; + } + /* Cleanup optional part. */ free(rp->drag); rp->drag = NULL; |