title: How can I make a weak protocol reference in 'pure' Swift (without @objc)
body: <p><code>weak</code> references don't seem to work in Swift unless a <code>protocol</code> is declared as <code>@objc</code>, which I don't want in a pure Swift app.</p>
  
  <p>This code gives a compile error (<code>weak</code> cannot be applied to non-class type <code>MyClassDelegate</code>):</p>
  
  <pre><code>class MyClass {
    weak var delegate: MyClassDelegate?
  }
  
  protocol MyClassDelegate {
  }
  </code></pre>
  
  <p>I need to prefix the protocol with <code>@objc</code>, then it works.</p>
  
  <p>Question: What is the 'pure' Swift way to accomplish a <code>weak</code> <code>delegate</code>?</p>