structAllocateInto method

  1. @override
void structAllocateInto(
  1. RaylibTemp<RaylibBase> temp,
  2. MemoryPointer<RType> p,
  3. String key
)
override

Allocates nested pointers into temp under key as needed.

Implementation

@override
void structAllocateInto(RaylibTemp temp, MemoryPointer p, String key) {
  field_data.allocate(temp, p, '${key}_data', count: _initialData?.length ?? dataLength, raw: true);

  if (_initialData != null) {
    _data.derefPtr<RUint8>().writeArray(_initialData!);
    _initialData = null;
  }
}