readArray method

List<D> readArray(
  1. int count, {
  2. bool owned = true,
})

Reads count structs sequentially from the memory referenced by this pointer.

If owned is true, each returned struct retains a StructPointer to its corresponding memory location, making it a live memory-backed value.

If owned is false, each returned struct is a detached copy and does not retain a pointer to the underlying memory.

Implementation

List<D> readArray(int count, {bool owned = true}) => .generate(count,
  (i) => _getAtIndex(i, owned: owned),
);