title: Should a NSWindowController release itself in windowWillClose:?
body: <p>I have a subclass of NSWindowController like this:</p>
  
  <pre><code>@interface MyController : NSWindowController &lt;NSWindowDelegate&gt;
  ...
  - (void)windowWillClose:(NSNotification *)notification;
  @end
  </code></pre>
  
  <p>It is the delegate of his window. Everything work OK.</p>
  
  <p>But, to avoid leaking memory, should I do this in the implementation ?</p>
  
  <pre><code>@implementation MyController
  ...
  - (void)windowWillClose:(NSNotification *)notification {
      ...
      [self release];
  }
  @end
  </code></pre>
  
  <p>If I don't do this, when I close the window with the little red close button, windowWillClose: is called, and in Instrument I see that the NSWindow is released but not the MyController...</p>
  
  <p>Is this "the way" of doing it ? Or am I taking risk ?</p>
  
  <p><strong>Note</strong>: <em>with Command-W the window and the controller are properly released since I'm catching this action in the AppDelegate, the one that has instantiated all this window &amp; controller and therefore know how/when to release them. But the little red close button performClose: on it's own and the best I have achieved is to catch windowWillClose: as a window delegate...</em></p>