title: Removing a NSNotificationCenter observer in iOS 5 ARC
body: <p>I have an iOS 5 ARC-based project, and am having difficulty about where I should be removing the observer for the <code>NSNotificationCenter</code> observations which I have registered within a <code>UIViewController</code>. Similar posts on SO have said this should be done in the <code>-dealloc</code> method. Even though this method is not required in ARC projects I have added it with the following code:</p>
  
  <pre><code>- (void)dealloc {
  
      [[NSNotificationCenter defaultCenter] removeObserver:self];
  
  }
  </code></pre>
  
  <p>As a test, I open the <code>UIViewController</code> (within a <code>UINavigationController</code>), do some things which trigger the notifications, and then pop it off the stack by tapping the Back button. I then reopen the <code>UIViewController</code>, and do some more things to trigger the notifications, but notice that each callback is being called twice - an indication that the previous notifications have not been deregistered. Repeating this procedure just causes each callback to be called more than more times, so they appear to never be deregistering.</p>
  
  <p>Any help would be appreciated!</p>