Generic Initializer

init(_:)

Explicit construction from an UnsafeMutablePointer. UnsafeMutablePointerからの明示的な組み立て。

Declaration 宣言

init?<U>(_ from: UnsafeMutablePointer<U>?)

Discussion 解説

Returns nil if from is nil. fromがnilならばnilを返します。

This is inherently unsafe; UnsafeMutablePointer assumes the referenced memory has +1 strong ownership semantics, whereas AutoreleasingUnsafeMutablePointer implies +0 semantics. これは、本質的に安全ではありません;UnsafeMutablePointerは参照されるメモリが+1の強力な所有権意味論を持つことを仮定します、そういうわけでAutoreleasingUnsafeMutablePointerは必然的に+0意味論です。

See Also 参照

Converting Pointers ポインタの変換