public void Clear()
 {
     while (this.assetResourceQueue.Count > 0)
     {
         LocalAssetResource resource = this.assetResourceQueue.Dequeue();
         resource.Dispose();
     }
     this.assetResourceQueue.Clear();
     foreach (LocalAssetResource current in this.m_dicAssetResoure.Values)
     {
         current.Dispose();
     }
     this.m_dicAssetResoure.Clear();
     this.m_dicAssetCollectDepResource.Clear();
 }
        /// <summary>
        /// 释放没用的资源
        /// </summary>
        /// <returns></returns>
        private bool UnLoadNotUsedResource()
        {
            bool          result = false;
            List <string> list   = new List <string>();

            foreach (var current in this.m_dicAssetResoure)
            {
                //如果资源被引用的次数为0,就加入到需要被卸载的列表内
                if (0 >= current.Value.RefCount)
                {
                    Debug.Log("UnloadADd:" + current.Key);
                    list.Add(current.Key);
                }
            }
            //遍历所有需要卸载的列表,释放资源
            for (int i = 0; i < list.Count; i++)
            {
                string             key           = list[i];
                LocalAssetResource assetResource = null;
                if (this.m_dicAssetResoure.TryGetValue(key, out assetResource))
                {
                    if (assetResource != null)
                    {
                        Debug.Log("dispose" + assetResource.URL);
                        assetResource.Dispose();
                        result = true;
                    }
                    this.m_dicAssetResoure.Remove(key);
                }
            }
            bool          flag  = false;
            List <string> list2 = new List <string>();

            foreach (var current2 in this.m_dicAssetCollectDepResource)
            {
                if (0 >= current2.Value.RefCount)
                {
                    if (!flag)
                    {
                        list2.Add(current2.Key);
                        flag = true;
                    }
                    else
                    {
                        if (current2.Value.GetRemoveQuickly())
                        {
                            list2.Add(current2.Key);
                        }
                    }
                }
            }
            for (int j = 0; j < list2.Count; j++)
            {
                string key2 = list2[j];
                LocalAssetCollectDepResource assetCollectDepResource = null;
                if (this.m_dicAssetCollectDepResource.TryGetValue(key2, out assetCollectDepResource))
                {
                    if (assetCollectDepResource != null)
                    {
                        Debug.Log("Unload:" + assetCollectDepResource.URL);
                        assetCollectDepResource.Dispose();
                        result = true;
                    }
                    this.m_dicAssetCollectDepResource.Remove(key2);
                }
            }
            return(result);
        }