title: set delegate in objective-c on iOS
body: <pre><code>- (id)initWithDelegate:(id)delegate
  {
      self = [super init];
      if (self)
      {
          _delegate = delegate;
  
      }
      return self;
  }
  </code></pre>
  
  <p>Is it generally recommended to pass in the delegate in the init method? what about in another method that will be called first?</p>
  
  <p>Also do I need to set <code>_delegate</code> to <code>nil</code> or release in the <code>dealloc</code> or <code>viewDidUnload</code> method? and what about the <code>dealloc</code> or <code>viewDidUnload</code> method of the controller implementing this delegate?</p>