hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=54217cda84b4019dfe8fd3428c7258f3ac58ae8c

commit 54217cda84b4019dfe8fd3428c7258f3ac58ae8c
Author: Hermet Park <[email protected]>
Date:   Mon Nov 18 11:49:52 2019 +0900

    evas image cache: drop cache properly,
    
    the default reference is 1,
    thus we should drop it unless if it's more than 1,
---
 src/lib/evas/common/evas_common_generic_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/common/evas_common_generic_cache.c 
b/src/lib/evas/common/evas_common_generic_cache.c
index 55bcf725d6..ddb055deb2 100644
--- a/src/lib/evas/common/evas_common_generic_cache.c
+++ b/src/lib/evas/common/evas_common_generic_cache.c
@@ -50,7 +50,7 @@ generic_cache_data_set(Generic_Cache *cache, void *key, void 
*surface)
    {
       entry = eina_list_data_get(eina_list_last(cache->lru_list));
       // if its still being ref.
-      if (entry->ref) return;
+      if (entry->ref > 1) return;
       eina_hash_del(cache->hash, &entry->key, entry);
       cache->lru_list = eina_list_remove_list(cache->lru_list, 
eina_list_last(cache->lru_list));
       cache->free_func(cache->user_data, entry->data);

-- 


Reply via email to