TH1/Unity/Assets/Scripts/Core/HashSetComponent.cs
2025-07-17 18:26:28 +08:00

23 lines
496 B
C#

using System;
using System.Collections.Generic;
namespace ET
{
public class HashSetComponent<T>: HashSet<T>, IDisposable
{
public HashSetComponent()
{
}
public static HashSetComponent<T> Create()
{
return ObjectPool.Instance.Fetch(typeof (HashSetComponent<T>)) as HashSetComponent<T>;
}
public void Dispose()
{
this.Clear();
ObjectPool.Instance.Recycle(this);
}
}
}