Exemplo n.º 1
0
        public bool Dealloc(GenIdx index)
        {
            var entry = Entries[index.Index];

            if (entry.Generation != index.Generation || !entry.Alive)
            {
                return(false);
            }
            Free.Push(index.Index);
            entry.Alive = false;
            return(true);
        }
Exemplo n.º 2
0
 public T? this[GenIdx idx]
 {
     get => Allocator.Alive(idx) ? Backing[idx.Index].Value : default(T?);
Exemplo n.º 3
0
        public bool Alive(GenIdx index)
        {
            var entry = Entries[index.Index];

            return(entry.Alive && entry.Generation == index.Generation);
        }