Explorar o código

修复一个bug,Hotfix层Disposer应该继承IDisposer2

tanghai %!s(int64=8) %!d(string=hai) anos
pai
achega
98287c7b0a

+ 4 - 1
Unity/Assets/Scripts/Entity/WWWAsync.cs

@@ -65,7 +65,9 @@ namespace Model
 				return;
 			}
 
-			this.tcs.SetResult(true);
+			var t = this.tcs;
+			this.tcs = null;
+			t?.SetResult(true);
 		}
 
 		public Task<bool> LoadFromCacheOrDownload(string url, Hash128 hash)
@@ -113,6 +115,7 @@ namespace Model
 
             www?.Dispose();
 			this.www = null;
+			this.tcs = null;
 		}
 	}
 }

+ 1 - 1
Unity/Hotfix/Base/Object/Disposer.cs

@@ -3,7 +3,7 @@ using Model;
 
 namespace Hotfix
 {
-	public abstract class Disposer : Object, IDisposable
+	public abstract class Disposer : Object, IDisposable2
 	{
 		public long Id { get; set; }