public static INoLockPoolNode <T> GetNode() { INoLockPoolNode <T> ret = null; LinkedListNode <INoLockPoolNode <T> > n = m_NodePool.First; if (n != null) { m_NodePool.Remove(n); ret = n.Value; } if (ret != null) { return(ret); } ret = new T(); return(ret); }
internal static void _DestroyNode(INoLockPoolNode <T> node) { if (node != null) { var n = node.PPoolNode; if (n.List != m_NodePool) { var list = n.List; if (list != m_NodePool) { if (list != null) { list.Remove(n); } m_NodePool.AddLast(n); } } } }