allocComplexStruct method

Pointer<ComplexStruct> allocComplexStruct()

Allocate single ComplexStruct

Returns a pointer to the allocated memory.

Implementation

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