allocPoints method

Pointer<Point> allocPoints(
  1. int count
)

Allocate an array of Points

  • count: The number of points to allocate. Returns a pointer to the allocated memory.

Implementation

Pointer<Point> allocPoints(int count) {
  if (_isDisposed) {
    throw StateError('Cannot allocate memory in disposed scope');
  }
  final ptr = calloc<Point>(count);
  _allocations.add(ptr);
  return ptr;
}