Hands-On Design Patterns with Swift
上QQ阅读APP看书,第一时间看更新

Strong references

Strong references are the default. Any time that you set a property on an object or capture a reference inside a block, the reference count increases on the object, and the lifetime of the object is extended:

class Child {

}

class Parent {
let children: [Parent]
}

let c = MyClass()
let other = MyOtherClass(class: c)