allocWithZone:

Returns an instance of the NSMachPort class.

Declaration

+ (id)allocWithZone:(NSZone *)zone

Parameters

zone

The memory zone in which to allocate the new object.

Return Value

An instance of the NSMachPort class.

Overview

For backward compatibility on Mach, allocWithZone: returns an instance of the NSMachPort class when sent to the NSPort class. Otherwise, it returns an instance of a concrete subclass that can be used for messaging between threads or processes on the local machine, or, in the case of NSSocketPort, between processes on separate machines.

See Also

Creating Instances

+ port

Creates and returns a new NSPort object capable of both sending and receiving messages.