initWithBytesNoCopy$1 method

NSData initWithBytesNoCopy$1(
  1. Pointer<Void> bytes, {
  2. required int length,
  3. ObjCBlock<Void Function(Pointer<Void>, UnsignedLong)>? deallocator,
})

initWithBytesNoCopy:length:deallocator:

Implementation

NSData initWithBytesNoCopy$1(
  ffi.Pointer<ffi.Void> bytes, {
  required int length,
  objc.ObjCBlock<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>?
  deallocator,
}) {
  objc.checkOsVersionInternal(
    'NSData.initWithBytesNoCopy:length:deallocator:',
    iOS: (false, (7, 0, 0)),
    macOS: (false, (10, 9, 0)),
  );
  final $ret = _objc_msgSend_134vhyh(
    object$.ref.retainAndReturnPointer(),
    _sel_initWithBytesNoCopy_length_deallocator_,
    bytes,
    length,
    deallocator?.ref.pointer ?? ffi.nullptr,
  );
  return NSData.fromPointer($ret, retain: false, release: true);
}