allocate<T extends NativeType> method Null safety

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

Allocates memory and includes it in the arena.

Uses the allocator provided to the Arena constructor to do the allocation.

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


Pointer<T> allocate<T extends NativeType>(int byteCount, {int? alignment}) {
  final p = _wrappedAllocator.allocate<T>(byteCount, alignment: alignment);
  return p;