initWithCharactersNoCopy method

NSString initWithCharactersNoCopy(
  1. Pointer<UnsignedShort> chars, {
  2. required int length,
  3. ObjCBlock<Void Function(Pointer<UnsignedShort>, UnsignedLong)>? deallocator,
})

initWithCharactersNoCopy:length:deallocator:

Implementation

NSString initWithCharactersNoCopy(
  ffi.Pointer<ffi.UnsignedShort> chars, {
  required int length,
  objc.ObjCBlock<
    ffi.Void Function(ffi.Pointer<ffi.UnsignedShort>, ffi.UnsignedLong)
  >?
  deallocator,
}) {
  final $ret = _objc_msgSend_talwei(
    object$.ref.retainAndReturnPointer(),
    _sel_initWithCharactersNoCopy_length_deallocator_,
    chars,
    length,
    deallocator?.ref.pointer ?? ffi.nullptr,
  );
  return NSString.fromPointer($ret, retain: false, release: true);
}