load method

  1. @override
void load(
  1. covariant IndexAllocatorOwnershipImage image
)
override

Replaces ownership from a compatible image.

The image records ownership only, so free indices are queued in ascending order.

Implementation

@override
void load(IndexAllocatorOwnershipImage image) {
  if (image.capacity != capacity) {
    throw ArgumentError.value(
        image.capacity, 'image', 'Must match capacity $capacity.');
  }
  _free
    ..clear()
    ..addAll(image.freeIndices);
}