Esempio n. 1
0
        /// <summary>
        /// Disposes of this container and deallocates its memory immediately.
        /// </summary>
        public void Dispose()
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            DisposeSentinel.Dispose(ref m_Safety, ref m_DisposeSentinel);
#endif
            UnsafeList.Destroy(m_ListData);
            m_ListData = null;
        }
            public void Execute()
            {
                UnsafeList <float3> .Destroy(vertices);

                UnsafeList <ushort> .Destroy(chainedIndices);

                UnsafeUtility.Free(hashTable, allocator);
            }
Esempio n. 3
0
 public void Dispose()
 {
     if (ptr != null)
     {
         AllocatorManager.Free(allocator, ptr);
         allocator = Allocator.Invalid;
         ptr       = null;
         length    = 0;
         UnsafeList.Destroy(emptyIndices);
     }
 }
Esempio n. 4
0
        public void Dispose()
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            DisposeSentinel.Dispose(ref m_Safety, ref m_DisposeSentinel);
#endif
            UnsafeList.Destroy(m_Vertices);
            m_Vertices = null;
            UnsafeList.Destroy(m_ChainedIndices);
            m_ChainedIndices = null;
            UnsafeUtility.Free(m_HashTable, m_AllocatorLabel);
        }
        public static void Free(DynamicBlobAssetBatch *batch)
        {
            var blobAssets = (BlobAssetPtr *)batch->m_BlobAssets->Ptr;

            for (var i = 0; i < batch->m_BlobAssets->Length; i++)
            {
                Memory.Unmanaged.Free(blobAssets[i].Header, batch->m_Allocator);
            }

            UnsafeList.Destroy(batch->m_BlobAssets);
            Memory.Unmanaged.Free(batch, batch->m_Allocator);
        }
        public void Dispose()
        {
            UnsafeList.Destroy(elements);
            elements = null;
            UnsafeList.Destroy(lookup);
            lookup = null;
            UnsafeList.Destroy(nodes);
            nodes = null;
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            DisposeSentinel.Dispose(ref safetyHandle, ref disposeSentinel);
#endif
        }
Esempio n. 7
0
        public void Execute()
        {
            if (list == null ||
                !list->IsCreated)
            {
                return;
            }

            try
            {
                UnsafeList <T> .Destroy(list);
            }
            catch
            {
                UnityEngine.Debug.LogError(typeof(T));
            }
        }
Esempio n. 8
0
 void Deallocate()
 {
     UnsafeList.Destroy(m_ListData);
     m_ListData = null;
 }
Esempio n. 9
0
 public void Dispose()
 {
     UnsafeList.Destroy(m_ListData);
 }
Esempio n. 10
0
 public void Dispose()
 {
     UnsafeList <T> .Destroy(m_Buffer);
 }