为handle 添加 using 支持

pull/52/head
gaozhou 2022-12-02 14:23:58 +08:00
parent 2696da092d
commit d1463e1fc6
1 changed files with 15 additions and 2 deletions

View File

@ -1,9 +1,22 @@
using System.Collections; using System;
using System.Collections;
namespace YooAsset namespace YooAsset
{ {
public abstract class OperationHandleBase : IEnumerator public abstract class OperationHandleBase : IEnumerator, IDisposable
{ {
private bool _isDisposed;
public void Dispose()
{
if (_isDisposed)
{
return;
}
_isDisposed = true;
ReleaseInternal();
}
private readonly AssetInfo _assetInfo; private readonly AssetInfo _assetInfo;
internal ProviderBase Provider { private set; get; } internal ProviderBase Provider { private set; get; }