title: NSMenu -- deleting items from menu while looping over items in menu
body: <p>Can I write code like the following? It seems to work, but I want to make sure that it is allowed/safe:</p>
  
  <pre><code>// menu is a NSMenu*
  for (NSMenuItem *item in [menu itemArray]) {
      if (some condition) {
          [menu removeItem:item];
      }
  }
  </code></pre>