NativeAlloc<C extends NativeType> constructor

NativeAlloc<C extends NativeType>(
  1. RaylibTemp temp,
  2. String name, {
  3. required int byteSize,
  4. required Pointer<C> allocatorFunc([
    1. int count
    ]),
  5. required String printerFunc(
    1. Pointer<C> ptr
    ),
})

Implementation

NativeAlloc(super.temp, super.name, {
  required super.byteSize,
  required super.allocatorFunc,
  required super.printerFunc,
}) : super(
  freeFunc: (ptr) => calloc.free(ptr),
  nullptrFactory: () => nullptr,
  pointerFactory: (ptr) => ptr,
  pointerToSource: (ptr) => ptr,
  isPointerNull: (ptr) => ptr == nullptr || ptr.address == 0,
);