forked from enlightenment/efl
evas/engine: Fix memory leak in generic cache.
Summary: During shutdown we used to call engine_image_free() which was causing some deadlock. as we have evas_cache which takes care of freeing all the images we just have to delete the generic cache without freeing the image during shutdown. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11915
This commit is contained in:
parent
c77a34402a
commit
97f4f7127a
|
@ -14,8 +14,17 @@ generic_cache_new(void *user_data, Generic_Cache_Free func)
|
||||||
EAPI void
|
EAPI void
|
||||||
generic_cache_destroy(Generic_Cache *cache)
|
generic_cache_destroy(Generic_Cache *cache)
|
||||||
{
|
{
|
||||||
generic_cache_dump(cache);
|
Generic_Cache_Entry *entry;
|
||||||
|
if (cache)
|
||||||
|
{
|
||||||
|
EINA_LIST_FREE(cache->lru_list, entry)
|
||||||
|
{
|
||||||
|
free(entry);
|
||||||
|
}
|
||||||
|
|
||||||
eina_hash_free(cache->hash);
|
eina_hash_free(cache->hash);
|
||||||
|
free(cache);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -167,8 +167,7 @@ eng_engine_free(void *engine)
|
||||||
Render_Engine_GL_Generic *e = engine;
|
Render_Engine_GL_Generic *e = engine;
|
||||||
Render_Output_GL_Generic *output;
|
Render_Output_GL_Generic *output;
|
||||||
|
|
||||||
//@FIXME this causes some deadlock while freeing the engine image.
|
generic_cache_destroy(e->software.surface_cache);
|
||||||
//generic_cache_destroy(e->software.surface_cache);
|
|
||||||
|
|
||||||
EINA_LIST_FREE(e->software.outputs, output)
|
EINA_LIST_FREE(e->software.outputs, output)
|
||||||
ERR("Output %p not properly cleaned before engine destruction.", output);
|
ERR("Output %p not properly cleaned before engine destruction.", output);
|
||||||
|
|
Loading…
Reference in New Issue