forked from enlightenment/efl
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.
This commit is contained in:
parent
3842e87d3a
commit
8ee0c30eb0
|
@ -610,7 +610,7 @@ evas_common_rgba_pending_unloads_cleanup(void)
|
|||
|
||||
EINA_LIST_FOREACH_SAFE(pending_unloads, l, l_next, ie)
|
||||
{
|
||||
if ((ie->need_unload) && (!ie->preload) && (!ie->flags.preload_done))
|
||||
if ((ie->need_unload) && (!ie->preload))
|
||||
{
|
||||
evas_common_rgba_image_unload_real(ie);
|
||||
pending_unloads = eina_list_remove_list(pending_unloads, l);
|
||||
|
|
Loading…
Reference in New Issue