WasmStringAlloc constructor

WasmStringAlloc(
  1. RaylibTemp temp,
  2. String name, {
  3. required int slotCount,
})

Implementation

WasmStringAlloc(super.temp, super.name, {
  required this.slotCount,
}) : super(
  byteSize: WasmSize.AnyPointer,
  pointerFactory: WasmStringPointer.new,
  printerFunc: (ptr) => ptr.ref,
) {
  reset();
  freePPFunc = (ptr) => WasmMemory.free(ptr.address);
  ptrAllocatorFunc = (count) => .new(WasmMemory.malloc(ptrByteSize*count));
  indexSetterFunc = (ptrptr, i, ptr) => ptrptr[i] = ptr;
}