allocate<T extends NativeType> method Null safety

Pointer<T> allocate <T extends NativeType>(
  1. int byteCount,
  2. {int? alignment}
)

Allocates byteCount bytes of memory on the native heap.

If alignment is provided, the allocated memory will be at least aligned to alignment bytes.

Throws an ArgumentError if the number of bytes or alignment cannot be satisfied.

Implementation

Pointer<T> allocate<T extends NativeType>(int byteCount, {int? alignment});