I was re-reading UIApplicationMain documentation and wondered, if UIApplicationMain never returns, why:

  • is there a return at the end?
  • is there an NSAutoreleasePool?

I even ask myself: why int main(int argc, char *argv[]) on an iPhone? Can we launch apps with a command line? What are argc and argv for? Are they used or just legacy C?

Some comments on Twitter from honorable fellows are that:

  • return is here for the compiler
  • the NSAutoreleasePool is useless.
  • the run loop needs an autorelease pool to be allocated (contradicts #2)
Edit
Report