public void Recycle(IPoolAllocatedObject <T> t) { if (null != t) { m_UnusedObjects.Enqueue(t.Downcast()); } }
public void Recycle(IPoolAllocatedObject <T> t) { if (null != t && m_UnusedObjects.Count < m_PoolSize) { int hashCode = t.GetHashCode(); if (!m_HashCodes.Contains(hashCode)) { m_HashCodes.Add(hashCode); m_UnusedObjects.Enqueue(t.Downcast()); } } }