I have a Swift class that needs to store a table of its own methods. Unfortunately this is causing a reference cycle, because its table retains references to self
In Swift 4 (I am not sure when the syntax became available), simply do { [weak self] (params) in } to make self weak. It basically is to [unowned self], what Self? is to Self!. The compiler even requires self?.foo instead of simply self.foo.