A system class is subclassed with the delegate referencing itself.
class MyScrollView: UIScrollView {
convenience init() {
delegate = self
}
// Is this necessary?
deinit {
delegate = nil
}
}
Does the UIScrollView.delegate
property have to be set to nil when deallocating the instance?