evas_image_main: fix memory leak of camera app -PLM[P161206-03545]
authorJiyoun Park <jy0703.park@samsung.com>
Fri, 6 Jan 2017 06:40:09 +0000 (15:40 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Fri, 6 Jan 2017 06:40:09 +0000 (15:40 +0900)
commit8ee0c30eb0950b0e142d77f4cb0da745085b2054
treeecc2963c1ccf63d05939fe2e571036cfffc2944e
parent3842e87d3a2b07698d18cf41e078298c78eeda5b
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.
src/lib/evas/common/evas_image_main.c