call<T extends NativeType> method
- [int count = 1]
Allocates sizeOf<T>() * count
bytes of memory using allocate.
// This allocates eight bytes, which is enough space for two Int32's.
allocator<Int32>(2);
This extension method must be invoked with a compile-time constant T
.
To allocate a specific number of bytes, not just a multiple of
sizeOf<T>()
, use allocate.
To allocate with a non constant T
, use allocate.
Prefer call for normal use, and use allocate for implementing an
Allocator in terms of other allocators.
Implementation
external Pointer<T> call<T extends NativeType>([int count = 1]);