コード例 #1
0
 public void DisposeBundleAndObjs(string bundlePath)
 {
     if (mABRelationDict.ContainsKey(bundlePath))
     {
         IABRelationManager iABRelationManager = mABRelationDict[bundlePath];
         List <string>      dependenceList     = iABRelationManager.GetDependences();
         for (int i = 0; i < dependenceList.Count; i++)
         {
             if (mABRelationDict.ContainsKey(dependenceList[i]))
             {
                 IABRelationManager dependence = mABRelationDict[dependenceList[i]];
                 if (dependence.RemoveReference(bundlePath))
                 {
                     DisposeBundle(dependence.BundlePath);
                 }
             }
         }
         if (iABRelationManager.GetReferences().Count <= 0)
         {
             iABRelationManager.Dispose();
             mABRelationDict.Remove(bundlePath);
             DisposeResObjs(bundlePath);
         }
     }
 }