Просмотр исходного кода

修复一个ListComponent判断容量的手写错误

tanghai 2 лет назад
Родитель
Сommit
75700f4cab

+ 0 - 4
Unity/Assets/Scripts/Core/HashSetComponent.cs

@@ -16,10 +16,6 @@ namespace ET
 
         public void Dispose()
         {
-            if (this.Count > 64) // 超过64,让gc回收
-            {
-                return;
-            }
             this.Clear();
             ObjectPool.Instance.Recycle(this);
         }

+ 1 - 1
Unity/Assets/Scripts/Core/ListComponent.cs

@@ -16,7 +16,7 @@ namespace ET
 
         public void Dispose()
         {
-            if (this.Count > 64) // 超过64,让gc回收
+            if (this.Capacity > 64) // 超过64,让gc回收
             {
                 return;
             }