Initializes a newly allocated
NSMach object with a given Mach port and the specified options.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The Mach port for the new port. This parameter should originally be of type mach_port_t.
Specifies options for what to do with the underlying port rights when the
NSMachobject is invalidated or destroyed. For a list of constants, see Mach Port Rights.
Returns an initialized
NSMach object that uses
mach to send or receive messages. The returned object might be different than the original receiver
Depending on the access rights for
mach, the new port may be able to only send messages. If a port with
mach already exists, this method deallocates the receiver, then retains and returns the existing port.