swift 之检查某个引用是否只有一个持有者的方法
2019-03-23 本文已影响0人
willokyes
/// - Parameter object: An instance of a class. This function does *not* modify
/// `object`; the use of `inout` is an implementation artifact.
/// - Returns: `true` if `object` is known to have a single strong reference;
/// otherwise, `false`.
public func isKnownUniquelyReferenced<T>(_ object: inout T) -> Bool where T : AnyObject