summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorJiyoun Park <jy0703.park@samsung.com>2017-01-06 15:40:09 +0900
committerJiyoun Park <jy0703.park@samsung.com>2017-01-06 15:40:09 +0900
commit8ee0c30eb0950b0e142d77f4cb0da745085b2054 (patch)
treeecc2963c1ccf63d05939fe2e571036cfffc2944e /src/lib/evas/common
parent3842e87d3a2b07698d18cf41e078298c78eeda5b (diff)
evas_image_main: fix memory leak of camera app -PLM[P161206-03545]
In gl engine, image objects try to unload image's pixel data after creating or updating the texture. but image entry's reference is still 1, it is added to the pending_unloads list, and it is cleaned when evas render function. If elm image use preload feature, preload_done flag is true, so this image data cannot be removed from pending_unloads list, it cause memory leak. I think it is better to free image's pixel data in evas_cache_image_unload_data, (not add to the pending_unloads list) but it it complicated to modify. so I'll remove the code to check preload_done flag in evas_common_rgba_pending_unloads_cleanup function. this flag check was added because of gl preloading, but now gl preloading feature is disabled. this flag is related with https://phab.enlightenment.org/D2823 I tested photocam, but crash doesn't occur anymore, even though removing flag check.
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_image_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index ab6d06d9e3..5b7a5447d2 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -610,7 +610,7 @@ evas_common_rgba_pending_unloads_cleanup(void)
610 610
611 EINA_LIST_FOREACH_SAFE(pending_unloads, l, l_next, ie) 611 EINA_LIST_FOREACH_SAFE(pending_unloads, l, l_next, ie)
612 { 612 {
613 if ((ie->need_unload) && (!ie->preload) && (!ie->flags.preload_done)) 613 if ((ie->need_unload) && (!ie->preload))
614 { 614 {
615 evas_common_rgba_image_unload_real(ie); 615 evas_common_rgba_image_unload_real(ie);
616 pending_unloads = eina_list_remove_list(pending_unloads, l); 616 pending_unloads = eina_list_remove_list(pending_unloads, l);