forked from enlightenment/efl
fix memory leak of dirty image
if file was chaned by somebody, it was added to dirty list during cache request. currently this dirty image added to cache->dirty list and never freed until image shutdown. but dirty image of chaned file never used so add delete code for memory efficiency. and fix bad indentation. SVN revision: 67604
This commit is contained in:
parent
4f4a904816
commit
64e2d7fee5
|
@ -780,6 +780,8 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
|
|||
* of an image at a given key. we wither find it and keep re-reffing
|
||||
* it or we dirty it and get it out */
|
||||
_evas_cache_image_dirty_add(im);
|
||||
/* this image never used, so it have to be deleted */
|
||||
_evas_cache_image_entry_delete(cache, im);
|
||||
im = NULL;
|
||||
}
|
||||
|
||||
|
@ -816,6 +818,8 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
|
|||
}
|
||||
/* as avtive cache find - if we match in lru and its invalid, dirty */
|
||||
_evas_cache_image_dirty_add(im);
|
||||
/* this image never used, so it have to be deleted */
|
||||
_evas_cache_image_entry_delete(cache, im);
|
||||
im = NULL;
|
||||
}
|
||||
if (stat_failed) goto on_stat_error;
|
||||
|
|
Loading…
Reference in New Issue