Static Methodswift 6.0.1Swift

    passUnretained(_:)

    Creates an unmanaged reference without performing an unbalanced retain.

    static func passUnretained(_ value: Instance) -> Unmanaged<Instance>

    Parameters

    value

    A class instance.

    Returns

    An unmanaged reference to the object passed as value.

    This is useful when passing a reference to an API which Swift does not know the ownership rules for, but you know that the API expects you to pass the object at +0.

    CFArraySetValueAtIndex(.passUnretained(array), i,
                           .passUnretained(object))

    Other members in extension

    Type members

    Instance members