Spec-Zone.ru › Dart 2

dart:ffi

call<T extends NativeType> method

Pointer<T> call<T extends NativeType>(
  1. [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]);

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-ffi/AllocatorAlloc/call.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API