bool ReleaseCache(CacheList entryList) { if (entryList.Release()) { if (!entryList.IsDone) { if (m_RetryReleaseEntryAction == null) { m_RetryReleaseEntryAction = RetryEntryRelease; } entryList.Retain(); //hold on since this will be retried... DelayedActionManager.AddAction(m_RetryReleaseEntryAction, .2f, entryList); return(false); } if (m_Lru != null) { m_Lru.AddFirst(entryList); while (m_Lru.Count > maxLruCount && m_Lru.Last.Value.IsDone) { m_Lru.Last.Value.ReleaseAssets(m_InternalProvider); m_Lru.RemoveLast(); } ResourceManagerEventCollector.PostEvent(ResourceManagerEventCollector.EventType.CacheLruCount, ProviderId + " LRU", m_Lru.Count); } else { entryList.ReleaseAssets(m_InternalProvider); } if (!m_Cache.Remove(entryList.GetHashCode())) { Debug.LogWarningFormat("Unable to find entryList {0} in cache.", entryList.location); } return(true); } return(false); }