allocate<T extends NativeType> static method
Implementation
static Pointer<T> allocate<T extends NativeType>(int bytes) {
final p = _alloc(bytes);
if (p == nullptr) {
throw StateError('native allocation of $bytes bytes failed');
}
return p.cast<T>();
}