Looks like weak references will be disallowed in protocols. So what am I supposed to do if I wanna add a weak reference? Any better idea?
protocol PipelineElementDelegate: class {
func someFunc()
}
protocol PipelineElement {
weak var delegate: PipelineElementDelegate? { get set}
}
Simply remove the weak
keyword from the protocol and declare the property as weak in the conforming type instead:
class SomeClass: PipelineElement {
weak var delegate: PipelineElementDelegate?
}