public void Dispose(string bundle) { if (manager.ContainsKey(bundle)) { LuaCallBackNode topNode = manager[bundle]; while (topNode.nextNode != null) { LuaCallBackNode curNode = topNode; topNode = topNode.nextNode; curNode.Dispose(); } topNode.Dispose(); manager.Remove(bundle); } }
/// <param name="bundleName"></param> public void RemoveBundleNode(string bundleName) { if (nodeDir.ContainsKey(bundleName)) { LuaCallBackNode currNode = nodeDir[bundleName]; while (currNode.nextNode != null) { LuaCallBackNode tmpNode = currNode.nextNode; currNode = currNode.nextNode; tmpNode.Dispose(); } currNode.Dispose(); nodeDir.Remove(bundleName); } }