Ejemplo n.º 1
0
        public NativeHashSet(int capacity, Allocator allocator)
        {
            NativeHashSetData.AllocateHashSet <T>(capacity, allocator, out buffer);
            this.allocator = allocator;
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            DisposeSentinel.Create(
                out m_Safety, out m_DisposeSentinel, callSiteStackDepth: 8, allocator: allocator);
#endif
            Clear();
        }
Ejemplo n.º 2
0
 void Deallocate()
 {
     NativeHashSetData.DeallocateHashSet(buffer, allocator);
     buffer = null;
 }