allocate method

  1. @override
void allocate(
  1. RaylibTemp<RaylibBase> temp,
  2. MemoryPointer<RType> p,
  3. String key, {
  4. int count = 1,
  5. bool raw = false,
})
override

Allocates any backing storage this field needs (e.g. string or array data that the field points to), using temp and identified by key.

p is the struct base pointer.

count is the number of elements to allocate for array-like fields.

raw is used for tracking the allocation (automatic deallocation, no manual free).

Fields stored inline in the struct have nothing to allocate and no-op.

Implementation

@override
void allocate(RaylibTemp temp, MemoryPointer p, String key, {int count = 1, bool raw = false}) {
  codec.allocate(temp, p.offsetBy(offset), key, count: count, raw: raw);
}