You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The public parameterless DisposeAsync() method is called implicitly in an await using statement, and its purpose is to free unmanaged resources, perform general cleanup, and to indicate that the finalizer, if one is present, need not run.
Freeing the memory associated with a managed object is always the domain of the garbage collector. Because of this, it has a standard implementation:
publicasyncValueTaskDisposeAsync(){// Perform async cleanup.awaitDisposeAsyncCore();// Dispose of unmanaged resources.Dispose(false);// Suppress finalization.GC.SuppressFinalize(this);}
The text was updated successfully, but these errors were encountered:
Excerpt from https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-disposeasync :
The text was updated successfully, but these errors were encountered: