allocate<T extends NativeType> method
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.
Implementation
@override
Pointer<T> allocate<T extends NativeType>(int byteCount, {int? alignment}) {
_ensureInUse();
final p = _wrappedAllocator.allocate<T>(byteCount, alignment: alignment);
_managedMemoryPointers.add(p);
return p;
}