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