Esempio n. 1
0
        public static FasterList <T> PreFill <U>(int initialSize) where U : T, new()
        {
            var list = new FasterList <T>(initialSize);

            for (int i = 0; i < initialSize; i++)
            {
                list.Add(new U());
            }

            list.Clear();

            return(list);
        }
        public void Clear()
        {
            _nodes.Clear();

            _numNodes = 0;
        }