Unmanaged
A type for propagating an unmanaged object reference.
@frozen struct Unmanaged<Instance> where Instance : AnyObject
Overview
When you use this type, you become partially responsible for keeping the object alive.
A type for propagating an unmanaged object reference.
@frozen struct Unmanaged<Instance> where Instance : AnyObject
When you use this type, you become partially responsible for keeping the object alive.
static func fromOpaque(UnsafeRawPointer) -> Unmanaged<Instance>
Unsafely turns an opaque C pointer into an unmanaged class reference.
static func passRetained(Instance) -> Unmanaged<Instance>
Creates an unmanaged reference with an unbalanced retain.
static func passUnretained(Instance) -> Unmanaged<Instance>
Creates an unmanaged reference without performing an unbalanced retain.
func release()
Performs an unbalanced release of the object.
func retain() -> Unmanaged<Instance>
Performs an unbalanced retain of the object.
func takeRetainedValue() -> Instance
Gets the value of this unmanaged reference as a managed reference and consumes an unbalanced retain of it.
func takeUnretainedValue() -> Instance
Gets the value of this unmanaged reference as a managed reference without consuming an unbalanced retain of it.
func toOpaque() -> UnsafeMutableRawPointer
Unsafely converts an unmanaged class reference to a pointer.
struct AtomicOptionalRepresentation
The atomic storage representation for Optional<Self>
.
struct AtomicRepresentation