allocate method

int? allocate()

Acquires and returns the index at the head of the free queue.

Implementation

int? allocate() => _free.isEmpty ? null : _free.removeFirst();