Returns a mach_port_t that holds a reference to the IOSurface.
- iOS 3.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
This is useful if you need to atomically or securely pass an IOSurface to another task without making the surface global to the entire system. The returned port must be deallocated with mach_port_deallocate or the equivalent.