コード例 #1
0
 //加载完成后,消息向上层传递完成了,就把命令
 public void Dispose(string bundle)
 {
     if (manager.ContainsKey(bundle))
     {
         NativeResCallBackNode tmpNode = manager[bundle];
         while (tmpNode.nextNode != null)
         {
             NativeResCallBackNode curNode = tmpNode;
             tmpNode = tmpNode.nextNode;
             curNode.Dispose();
             manager.Remove(bundle);
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// 加载完成后且向上传递消息,传递完后调用
 /// </summary>
 /// <param name="bundle"></param>
 public void Dispose(string bundle)
 {
     if (mNodeManager.ContainsKey(bundle))
     {
         NativeResCallBackNode headNode = mNodeManager[bundle];
         while (headNode.NextNode != null)
         {
             NativeResCallBackNode curNode = headNode;
             headNode = headNode.NextNode;
             curNode.Dispose();
         }
         headNode.Dispose();
         mNodeManager.Remove(bundle);
     }
 }
コード例 #3
0
    /// <summary>
    /// 加载完成后,消息向上层传递完成了,就把这些缓存的命令删除
    /// </summary>
    /// <param name="bundleName"></param>
    public void DisPose(string bundleName)
    {
        if (callBackNodes.ContainsKey(bundleName))
        {
            NativeResCallBackNode curNode  = callBackNodes[bundleName];
            NativeResCallBackNode nextNode = null;

            // 挨个释放node
            do
            {
                nextNode = curNode.nextNode;
                curNode.Dispose();

                curNode = nextNode;
            } while (curNode != null);

            callBackNodes.Remove(bundleName);
        }
    }
コード例 #4
0
    public void Dispose(string bundle)
    {
        if (manager.ContainsKey(bundle))
        {
            NativeResCallBackNode topNode = manager[bundle];

            // 挨个释放
            while (topNode.nextValue != null)
            {
                NativeResCallBackNode curNode = topNode;

                topNode = topNode.nextValue;


                curNode.Dispose();
            }
            // 最后一个结点的释放
            topNode.Dispose();


            manager.Remove(bundle);
        }
    }