/// <summary> /// Returns IGenericPoolElement back to the respective GenericPooler /// </summary> public static void ReturnToPool(this IGenericPoolElement element) { Debug.Assert(element != null, "Element is null"); if (element.UsesAutoPool) { AutoPooler.ReturnToPool(element); } else { GenericPooler.ReturnToPool(element); } }