也就是 <code>UnsafePointer<Type></code>
可以傳入的類型:
<code>UnsafePointer<Type></code>/<code>UnsafeMutablePointer<Type></code>/<code>AutoreleasingUnsafeMutablePointer<Type></code>
<code>String</code>。如果<code>Type</code> 是 <code>UInt8</code> 或 <code>Int8</code>。
可變類型的 <code>Type</code> 的 <code>in-out</code> 類型。
<code>[Type]</code> 類型,被當作指向第一個元素的位址
例子如下:
The pointer you pass to the function is only guaranteed to be valid for the duration of the function call. Do not persist the pointer and access it after the function has returned.
即<code>UnsafeMutablePointer<Type></code>
<code>UnsafeMutablePointer<Type></code>
<code>[Type]</code> 類型,必須是可變類型。
例子:
即<code>AutoreleasingUnsafeMutablePointer<Type></code>
可以傳入:
AutoreleasingUnsafeMutablePointer
可以傳入的類型有:
top-level Swift function
a closure literal
a closure declared with the @convention(c) attribute
nil