Remove all images pending preload before cache shuts down.

SVN revision: 38703
This commit is contained in:
Gustavo Sverzut Barbieri 2009-01-23 00:09:10 +00:00
parent 83783665f5
commit 763999fa8b
1 changed files with 25 additions and 0 deletions

View File

@ -501,6 +501,31 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
if (cache->references > 0)
return ;
#ifdef BUILD_ASYNC_PRELOAD
pthread_mutex_lock(&mutex);
if (running)
{
while (preload)
{
Evas_Cache_Preload *tmp = (Evas_Cache_Preload *)preload;
Image_Entry *ie = tmp->ie;
while (ie->targets)
{
Evas_Cache_Target *t = ie->targets;
ie->targets = (Evas_Cache_Target *)
eina_inlist_remove(EINA_INLIST_GET(ie->targets),
EINA_INLIST_GET(ie->targets));
free(t);
}
preload = eina_inlist_remove(preload, preload);
free(tmp);
}
}
pthread_mutex_unlock(&mutex);
#endif
while (cache->lru)
{
im = (Image_Entry *) cache->lru;