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