title: Re-initialize a lazy initialized variable in Swift
body: <p>I have a variable that initialized as:</p>
  
  <pre><code>lazy var aClient:Clinet = {
      var _aClient = Clinet(ClinetSession.shared())
      _aClient.delegate = self
      return _aClient
  }()
  </code></pre>
  
  <p>The problem is, at some point, I need to reset this <code>aClient</code> variable so it can initialize again when the <code>ClinetSession.shared()</code> changed. But if I set the class to optional <code>Clinet?</code>, LLVM will give me an error when I try to set it to <code>nil</code>. If I just reset it somewhere in the code using <code>aClient = Clinet(ClinetSession.shared())</code>, it will end up with <code>EXEC_BAD_ACCESS</code>.</p>
  
  <p>Is there a way that can use <code>lazy</code> and being allowed to reset itself?</p>