Esempio n. 1
0
 public void Recycle(ref NativeBufferArray <T> value)
 {
     if (value != null)
     {
         value.Dispose();
     }
 }
Esempio n. 2
0
 public static void Recycle(ref NativeBufferArray <T> buffer)
 {
     if (buffer.isCreated == true)
     {
         buffer.Dispose();
     }
     buffer = NativeBufferArray <T> .Empty;
 }
        public static void RecycleWithIndex <T, TCopy>(ref NativeBufferArray <T> item, TCopy copy) where TCopy : IArrayElementCopyWithIndex <T> where T : struct
        {
            for (int i = 0; i < item.Length; ++i)
            {
                copy.Recycle(i, ref item.arr.GetRef(i));
            }

            item = item.Dispose();
        }
        public static void Recycle <T, TCopy>(ref NativeBufferArray <T> item, TCopy copy) where TCopy : IArrayElementCopy <T> where T : struct
        {
            for (int i = 0; i < item.Length; ++i)
            {
                copy.Recycle(item.arr[i]);
            }

            item = item.Dispose();
        }