title: Simple objective-c code segfaulting with NSWindow windowNumbersWithOptions
body: <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import &lt;AppKit/AppKit.h&gt;
  
  int main(int argc, const char * argv[])
  {     
  @autoreleasepool {
  
      NSArray* windowList = [[NSArray alloc] init];
  
      windowList = [NSWindow windowNumbersWithOptions:0];
      NSLog(@"%lu", [windowList count]);
  }
  return 0;
  }
  </code></pre>
  
  <p>Segfaulting when calling NSWindow windowNumbersWithOptions</p>