# HashSetPool<T>

> A version of CollectionPool<TCollection, TItem> for HashSets.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Pool](/engine/6000.6/script-reference/unityengine/pool.md)
* **Assembly:** UnityEngine.CoreModule
* **Inherits from:** CollectionPool\<HashSet\<T>, T>

```csharp
public class HashSetPool<T> : CollectionPool<HashSet<T>, T>
```

## Examples

```csharp
using UnityEngine.Pool;

public class Example
{
    void GetPooled()
    {
        // Get a pooled instance
        var instance = HashSetPool<int>.Get();

        // Use the HashSet

        // Return it back to the pool
        HashSetPool<int>.Release(instance);
    }
}
```

## Inheritance

**Inherited Members:**

* CollectionPool\<HashSet\<T>, T>.Get()
* CollectionPool\<HashSet\<T>, T>.Get(HashSet\<T>)
* CollectionPool\<HashSet\<T>, T>.Release(HashSet\<T>)
