A type for propagating an unmanaged object reference.
SDK
- Xcode 6.0.1+
Framework
- Swift Standard Library
Declaration
Overview
When you use this type, you become partially responsible for keeping the object alive.
A type for propagating an unmanaged object reference.
SDK
Framework
When you use this type, you become partially responsible for keeping the object alive.
func autorelease() -> Unmanaged<Instance>
Performs an unbalanced autorelease of the object.
func release()
Performs an unbalanced release of the object.
func retain() -> Unmanaged<Instance>
Performs an unbalanced retain of the object.
func take Retained Value() -> Instance
Gets the value of this unmanaged reference as a managed reference and consumes an unbalanced retain of it.
func take Unretained Value() -> Instance
Gets the value of this unmanaged reference as a managed reference without consuming an unbalanced retain of it.
func to Opaque() -> Unsafe Mutable Raw Pointer
Unsafely converts an unmanaged class reference to a pointer.
static func from Opaque(Unsafe Raw Pointer) -> Unmanaged<Instance>
Unsafely turns an opaque C pointer into an unmanaged class reference.
static func pass Retained(Instance) -> Unmanaged<Instance>
Creates an unmanaged reference with an unbalanced retain.
static func pass Unretained(Instance) -> Unmanaged<Instance>
Creates an unmanaged reference without performing an unbalanced retain.
func with Extended Lifetime<T, Result>(T, (T) -> Result) -> Result
Evaluates a closure while ensuring that the given instance is not destroyed before the closure returns.
func with Extended Lifetime<T, Result>(T, () -> Result) -> Result
Evaluates a closure while ensuring that the given instance is not destroyed before the closure returns.