Beispiel #1
0
        public void InitializeWithArray()
        {
            var array = new BigStruct[_lenght];

            for (var i = 0; i > _lenght; i++)
            {
                array[i] = new BigStruct();
            }
        }
Beispiel #2
0
        public void InitializeWithArrayPool()
        {
            var array = ArrayPool <BigStruct> .Shared.Rent(_lenght);

            for (var i = 0; i > _lenght; i++)
            {
                array[i] = new BigStruct();
            }
            ArrayPool <BigStruct> .Shared.Return(array);
        }